bnstooltips 1.6.4 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ItemImproveTooltip/ItemImproveTooltip.d.ts +5 -0
- package/build/ItemImproveTooltip/ItemImproveTooltip.types.d.ts +11 -0
- package/build/ItemImproveTooltipWrapper/ItemImproveTooltipWrapper.d.ts +6 -0
- package/build/ItemImproveTooltipWrapper/ItemImproveTooltipWrapper.types.d.ts +11 -0
- package/build/ItemTooltip/ItemTooltip.d.ts +1 -1
- package/build/ItemTooltip/ItemTooltip.types.d.ts +1 -0
- package/build/ItemTooltip/SubComponents/DecomposeResults.d.ts +1 -0
- package/build/ItemTooltip/SubComponents/ItemIconNameDiv.d.ts +4 -1
- package/build/ItemTooltipWrapper/ItemTooltipWrapper.types.d.ts +1 -0
- package/build/TooltipWrapper/TooltipWrapper.d.ts +6 -0
- package/build/TooltipWrapper/TooltipWrapper.types.d.ts +17 -0
- package/build/Utilities/INpc.d.ts +1 -1
- package/build/Utilities/TooltipSettingsBase.d.ts +13 -0
- package/build/index.d.ts +4 -0
- package/build/index.es.js +557 -311
- package/build/index.es.js.map +1 -1
- package/build/index.js +558 -310
- package/build/index.js.map +1 -1
- package/build/itemapiclient/api.d.ts +142 -0
- package/package.json +8 -8
package/build/index.js
CHANGED
|
@@ -58,8 +58,8 @@ function styleInject(css, ref) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
var css_248z$
|
|
62
|
-
styleInject(css_248z$
|
|
61
|
+
var css_248z$9 = "*[class*=\"00008130.UI.Label_LightYellow_12\"] {\n color: #ecd967 !important; }\n\n*[class*=\"00008130.UI.Vital_LightBlue\"] {\n color: #46bee1 !important;\n font-weight: 500 !important; }\n\n*[class*=\"00008130.UI.Label_Green03_12\"] {\n color: #58ff77 !important; }\n\n*[class*=\"00008130.Program.Fontset_Chatting_Color_19\"] {\n color: #58ff77; }\n\n.TooltipBase_grade-none {\n color: #c2cadc; }\n\n.TooltipBase_grade-1 {\n color: #6c6c6c !important; }\n\n.TooltipBase_border-grade-1 {\n border-color: #6c6c6c !important; }\n\n.TooltipBase_border-hover-grade-1:hover {\n border-color: #6c6c6c !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_1\"] {\n color: #6c6c6c !important;\n border-color: #6c6c6c !important; }\n\n.TooltipBase_grade-2 {\n color: #ffffff !important; }\n\n.TooltipBase_border-grade-2 {\n border-color: #ffffff !important; }\n\n.TooltipBase_border-hover-grade-2:hover {\n border-color: #ffffff !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_2\"] {\n color: #ffffff !important;\n border-color: #ffffff !important; }\n\n.TooltipBase_grade-3 {\n color: #58ff77 !important; }\n\n.TooltipBase_border-grade-3 {\n border-color: #58ff77 !important; }\n\n.TooltipBase_border-hover-grade-3:hover {\n border-color: #58ff77 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_3\"] {\n color: #58ff77 !important;\n border-color: #58ff77 !important; }\n\n.TooltipBase_grade-4 {\n color: #46bee1 !important; }\n\n.TooltipBase_border-grade-4 {\n border-color: #46bee1 !important; }\n\n.TooltipBase_border-hover-grade-4:hover {\n border-color: #46bee1 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_4\"] {\n color: #46bee1 !important;\n border-color: #46bee1 !important; }\n\n.TooltipBase_grade-5 {\n color: #d739ff !important; }\n\n.TooltipBase_border-grade-5 {\n border-color: #d739ff !important; }\n\n.TooltipBase_border-hover-grade-5:hover {\n border-color: #d739ff !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_5\"] {\n color: #d739ff !important;\n border-color: #d739ff !important; }\n\n.TooltipBase_grade-6 {\n color: #f1b248 !important; }\n\n.TooltipBase_border-grade-6 {\n border-color: #f1b248 !important; }\n\n.TooltipBase_border-hover-grade-6:hover {\n border-color: #f1b248 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_6\"] {\n color: #f1b248 !important;\n border-color: #f1b248 !important; }\n\n.TooltipBase_grade-7 {\n color: #ff770a !important; }\n\n.TooltipBase_border-grade-7 {\n border-color: #ff770a !important; }\n\n.TooltipBase_border-hover-grade-7:hover {\n border-color: #ff770a !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_7\"] {\n color: #ff770a !important;\n border-color: #ff770a !important; }\n\n.TooltipBase_grade-8 {\n color: #ff0084 !important; }\n\n.TooltipBase_border-grade-8 {\n border-color: #ff0084 !important; }\n\n.TooltipBase_border-hover-grade-8:hover {\n border-color: #ff0084 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_8\"] {\n color: #ff0084 !important;\n border-color: #ff0084 !important; }\n\n.TooltipBase_iconbg-grade-1 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_1.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-2 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_2.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-3 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_3.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-4 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_4.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-5 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_5.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-6 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_6.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-7 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_7.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-8 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_9.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-9 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_9.png\") no-repeat; }\n\n.TooltipBase_container {\n box-sizing: border-box;\n font-family: \"Montserrat\", sans-serif !important;\n scroll-behavior: smooth;\n touch-action: manipulation;\n -webkit-overflow-scrolling: touch;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n position: relative;\n display: inline-flex;\n flex-direction: column;\n background-color: rgba(3, 3, 3, 0.9);\n backdrop-filter: brightness(1.5) blur(5px);\n -webkit-backdrop-filter: brightness(1.5) blur(5px);\n padding: 1rem;\n border: 1px solid;\n border-color: #6c6c6c;\n font-weight: 500;\n font-size: 16px;\n text-decoration: none;\n color: #fff;\n width: 380px;\n max-height: calc(100vh - 50px);\n overflow-y: auto;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n border-radius: 3px;\n text-shadow: black 1px 1px 0; }\n\n.TooltipBase_containerFullHeight {\n height: 99%; }\n\n.TooltipBase_container::-webkit-scrollbar {\n display: none; }\n\n@media only screen and (max-width: 380px) {\n .TooltipBase_container {\n width: 100%; } }\n\n@supports not (backdrop-filter: brightness(1.5) blur(5px)) {\n .TooltipBase_container {\n background-color: rgba(0, 0, 0, 0.95); }\n .TooltipBase_container-loading {\n background-color: rgba(0, 0, 0, 0.95); } }\n\n.TooltipBase_container-loading {\n background-color: rgba(3, 3, 3, 0.9);\n backdrop-filter: brightness(1.5) blur(5px);\n -webkit-backdrop-filter: brightness(1.5) blur(5px);\n padding: 1rem; }\n\n.TooltipBase_titlesubtitle {\n display: flex;\n justify-content: space-between;\n margin-bottom: 1rem; }\n\n.TooltipBase_title {\n flex: 1;\n overflow: hidden;\n padding-right: 1rem; }\n\n.TooltipBase_title_text {\n font-size: 18px;\n text-shadow: black 1px 1px 0;\n font-weight: 500; }\n\n.TooltipBase_subtitle {\n text-align: end;\n font-size: 12px; }\n\n.TooltipBase_iconmaininfo {\n display: flex;\n margin-bottom: 0.8rem; }\n\n.TooltipBase_iconcontainer {\n margin-right: 0.5rem;\n margin-bottom: 0.25rem;\n float: left;\n position: relative; }\n\n.TooltipBase_iconBg {\n width: 64px;\n height: 64px;\n background-origin: content-box !important; }\n\n.TooltipBase_icon {\n width: calc(64px - (0px * 2));\n height: calc(64px - (0px * 2));\n padding: 0px; }\n\n.TooltipBase_maininfocontainer {\n font-size: 16px;\n font-weight: 500; }\n\n.TooltipBase_maininfocontainer > div:not(:last-child) {\n margin-bottom: 0.2rem; }\n\n.TooltipBase_fullwidthContainer {\n line-height: 17px; }\n\n.TooltipBase_fullwidthContainer > div:not(:last-child) {\n margin-bottom: 0.5rem; }\n\n.TooltipBase_fullwidthContainer-subContainer {\n font-size: 12px; }\n\n.TooltipBase_fullwidthContainer-subContainer > div:not(:last-child) {\n margin-bottom: 0.1rem; }\n\n.TooltipBase_flex {\n display: flex;\n align-items: center; }\n\n.TooltipBase_flex-col {\n display: flex;\n justify-content: center;\n flex-direction: column; }\n\n.TooltipBase_descriptions-description-title {\n font-weight: 500; }\n";
|
|
62
|
+
styleInject(css_248z$9);
|
|
63
63
|
|
|
64
64
|
function TooltipBase(_a) {
|
|
65
65
|
var title = _a.title, category = _a.subtitle, grade = _a.grade, _b = _a.icon, icon = _b === void 0 ? "" : _b, _c = _a.mainInfos, mainTexts = _c === void 0 ? [] : _c, _d = _a.subInfoGroups, subTexts = _d === void 0 ? [] : _d, id = _a.id, _e = _a.fullHeight, fullHeight = _e === void 0 ? false : _e;
|
|
@@ -161,8 +161,8 @@ function __generator(thisArg, body) {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
var css_248z$
|
|
165
|
-
styleInject(css_248z$
|
|
164
|
+
var css_248z$8 = ".ItemTooltip_itemIconLoading {\n width: 50px;\n padding: 0.22rem 0;\n display: flex;\n justify-content: center;\n align-items: center; }\n\n.ItemTooltip_jobstyleToggleContainer {\n display: flex; }\n\n.ItemTooltip_optionPadding {\n margin: .2rem 0 .5rem 0; }\n\n.ItemTooltip_showButton {\n flex: 1;\n border: none;\n padding: 0.33rem 0.5rem;\n border-radius: 0;\n background-color: rgba(233, 233, 233, 0.2);\n color: #fff;\n opacity: 0.8;\n cursor: pointer;\n transition: background-color 0.1s; }\n .ItemTooltip_showButton:hover {\n background-color: rgba(255, 255, 255, 0.3);\n opacity: 1; }\n .ItemTooltip_showButton-active {\n background-color: rgba(255, 255, 255, 0.4) !important;\n color: #fff;\n opacity: 1; }\n\n.ItemTooltip_jobstyleButton {\n flex: 1;\n border: none;\n padding: 0.33rem 0.5rem;\n border-radius: 0;\n background-color: rgba(233, 233, 233, 0.1);\n color: #fff;\n opacity: 0.8;\n cursor: pointer;\n transition: background-color 0.1s; }\n .ItemTooltip_jobstyleButton:hover {\n background-color: rgba(255, 255, 255, 0.2);\n opacity: 1; }\n .ItemTooltip_jobstyleButton-active {\n background-color: rgba(255, 255, 255, 0.3) !important;\n color: #fff;\n opacity: 1; }\n\n.ItemTooltip_itemiconnamedivspan {\n display: flex;\n justify-content: center;\n align-items: center; }\n\n.ItemTooltip_cooldown {\n font-weight: 400;\n font-size: 12px; }\n\n.ItemTooltip_subInfo {\n font-size: 14px; }\n\n.ItemTooltip_stats_mainstat {\n font-size: 16px;\n margin-bottom: 0.05rem; }\n\n.ItemTooltip_stats_substat {\n font-size: 14px; }\n\n.ItemTooltip_itemIconInline {\n width: 18px !important;\n height: 18px !important;\n margin: 0 1px;\n top: 3px;\n position: relative; }\n\n.ItemTooltip_itemIconRandom {\n width: 36px !important;\n top: 6px;\n margin: 0 1px 0 2px; }\n\n.ItemTooltip_itemIconSmall {\n width: 20px !important;\n height: 20px !important;\n margin-right: 0.33rem; }\n\n.ItemTooltip_setBonus {\n margin-bottom: 0.8rem !important; }\n\n.ItemTooltip_setContainer {\n padding-left: 0.33rem;\n padding-top: 0.22rem; }\n\n.ItemTooltip_setStageContainer {\n display: flex;\n margin: 0.25rem 0 0.35rem 0; }\n\n.ItemTooltip_setStageNumber {\n margin-top: 0.2rem;\n padding-top: 0.1rem;\n line-height: 16px;\n width: 16px;\n height: 16px;\n max-height: 16px;\n font-weight: 500;\n display: flex;\n justify-content: center;\n align-items: center;\n color: rgba(88, 255, 119, 0.8);\n border: 1px solid rgba(88, 255, 119, 0.9);\n border-radius: 3px; }\n\n.ItemTooltip_setStageContent {\n padding-top: 0.2rem;\n flex-grow: 2;\n padding-left: 0.55rem;\n max-width: 90%;\n color: #58ff77; }\n\n.ItemTooltip_itemiconnamediv {\n display: flex;\n align-items: center;\n padding: 0.15rem 0 0.15rem 0.33rem;\n line-height: 20px; }\n\n.ItemTooltip_setItemIconNameDiv {\n display: flex;\n align-items: center;\n padding: 0.11rem 0 0.11rem 0.33rem;\n line-height: 20px; }\n\n.ItemTooltip_setItemsContainer {\n display: flex;\n font-size: 12px; }\n\n.ItemTooltip_setItemsSubContainer {\n flex: 1; }\n\n.ItemTooltip_itemNameRandomDiv {\n display: flex;\n align-items: center; }\n\n@media only screen and (max-width: 380px) {\n .ItemTooltip_jobstyleButton {\n padding: 0.5rem; } }\n\n/**\r\n * ==============================================\r\n * Dot Elastic\r\n * ==============================================\r\n */\n.dot-elastic {\n position: relative;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElastic 1s infinite linear; }\n\n.dot-elastic::before,\n.dot-elastic::after {\n content: \"\";\n display: inline-block;\n position: absolute;\n top: 0; }\n\n.dot-elastic::before {\n left: -15px;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElasticBefore 1s infinite linear; }\n\n.dot-elastic::after {\n left: 15px;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElasticAfter 1s infinite linear; }\n\n@keyframes dotElasticBefore {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1.5); }\n 50% {\n transform: scale(1, 0.67); }\n 75% {\n transform: scale(1, 1); }\n 100% {\n transform: scale(1, 1); } }\n\n@keyframes dotElastic {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1); }\n 50% {\n transform: scale(1, 1.5); }\n 75% {\n transform: scale(1, 1); }\n 100% {\n transform: scale(1, 1); } }\n\n@keyframes dotElasticAfter {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1); }\n 50% {\n transform: scale(1, 0.67); }\n 75% {\n transform: scale(1, 1.5); }\n 100% {\n transform: scale(1, 1); } }\n";
|
|
165
|
+
styleInject(css_248z$8);
|
|
166
166
|
|
|
167
167
|
function BuildIconPath(iconPath, iconIndex) {
|
|
168
168
|
if (iconPath == null)
|
|
@@ -740,6 +740,27 @@ var BnsItemApiFetchParamCreator = function (configuration) {
|
|
|
740
740
|
options: localVarRequestOptions,
|
|
741
741
|
};
|
|
742
742
|
},
|
|
743
|
+
/**
|
|
744
|
+
*
|
|
745
|
+
* @param {*} [options] Override http request option.
|
|
746
|
+
* @throws {RequiredError}
|
|
747
|
+
*/
|
|
748
|
+
bnsItemRegionsGet: function (options) {
|
|
749
|
+
if (options === void 0) { options = {}; }
|
|
750
|
+
var localVarPath = "/BnsItem/Regions";
|
|
751
|
+
var localVarUrlObj = url__namespace.parse(localVarPath, true);
|
|
752
|
+
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
753
|
+
var localVarHeaderParameter = {};
|
|
754
|
+
var localVarQueryParameter = {};
|
|
755
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
756
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
757
|
+
delete localVarUrlObj.search;
|
|
758
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
759
|
+
return {
|
|
760
|
+
url: url__namespace.format(localVarUrlObj),
|
|
761
|
+
options: localVarRequestOptions,
|
|
762
|
+
};
|
|
763
|
+
},
|
|
743
764
|
/**
|
|
744
765
|
*
|
|
745
766
|
* @param {string} region
|
|
@@ -1006,6 +1027,26 @@ var BnsItemApiFp = function (configuration) {
|
|
|
1006
1027
|
});
|
|
1007
1028
|
};
|
|
1008
1029
|
},
|
|
1030
|
+
/**
|
|
1031
|
+
*
|
|
1032
|
+
* @param {*} [options] Override http request option.
|
|
1033
|
+
* @throws {RequiredError}
|
|
1034
|
+
*/
|
|
1035
|
+
bnsItemRegionsGet: function (options) {
|
|
1036
|
+
var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemRegionsGet(options);
|
|
1037
|
+
return function (fetch, basePath) {
|
|
1038
|
+
if (fetch === void 0) { fetch = isomorphicFetch__namespace; }
|
|
1039
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
1040
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
|
|
1041
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1042
|
+
return response.json();
|
|
1043
|
+
}
|
|
1044
|
+
else {
|
|
1045
|
+
throw response;
|
|
1046
|
+
}
|
|
1047
|
+
});
|
|
1048
|
+
};
|
|
1049
|
+
},
|
|
1009
1050
|
/**
|
|
1010
1051
|
*
|
|
1011
1052
|
* @param {string} region
|
|
@@ -1153,6 +1194,15 @@ var BnsItemApi = /** @class */ (function (_super) {
|
|
|
1153
1194
|
BnsItemApi.prototype.bnsItemPingGet = function (options) {
|
|
1154
1195
|
return BnsItemApiFp(this.configuration).bnsItemPingGet(options)(this.fetch, this.basePath);
|
|
1155
1196
|
};
|
|
1197
|
+
/**
|
|
1198
|
+
*
|
|
1199
|
+
* @param {*} [options] Override http request option.
|
|
1200
|
+
* @throws {RequiredError}
|
|
1201
|
+
* @memberof BnsItemApi
|
|
1202
|
+
*/
|
|
1203
|
+
BnsItemApi.prototype.bnsItemRegionsGet = function (options) {
|
|
1204
|
+
return BnsItemApiFp(this.configuration).bnsItemRegionsGet(options)(this.fetch, this.basePath);
|
|
1205
|
+
};
|
|
1156
1206
|
/**
|
|
1157
1207
|
*
|
|
1158
1208
|
* @param {string} region
|
|
@@ -1248,203 +1298,11 @@ var ItemDownloadClient = /** @class */ (function () {
|
|
|
1248
1298
|
return ItemDownloadClient;
|
|
1249
1299
|
}());
|
|
1250
1300
|
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
return React__default["default"].createElement("div", { dangerouslySetInnerHTML: { __html: item.mainInfo } });
|
|
1254
|
-
return null;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
function ItemSubInfo(item) {
|
|
1258
|
-
if (item.subInfo != null)
|
|
1259
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_subInfo", dangerouslySetInnerHTML: {
|
|
1260
|
-
__html: ReplaceIconsInHtmlString(item.subInfo),
|
|
1261
|
-
} }));
|
|
1262
|
-
return null;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
function ItemSkillTitles(_a) {
|
|
1266
|
-
var item = _a.item, itemCombats = _a.itemCombats, jobstyle = _a.jobstyle;
|
|
1267
|
-
if (item.skills == null || item.skills.length == 0)
|
|
1268
|
-
return null;
|
|
1269
|
-
var computedSkills = item.skills;
|
|
1270
|
-
if (itemCombats) {
|
|
1271
|
-
computedSkills = computedSkills.filter(function (x) { return x.jobstyle === jobstyle; });
|
|
1272
|
-
}
|
|
1273
|
-
computedSkills = computedSkills.filter(function (x) { return x.title != null; });
|
|
1274
|
-
return (React__default["default"].createElement("div", null, computedSkills.map(function (itemSkill, i) { return (React__default["default"].createElement("div", { key: itemSkill.title + "_" + i, dangerouslySetInnerHTML: { __html: itemSkill.title } })); })));
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
function ItemCooldowns(item) {
|
|
1278
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1279
|
-
item.cooldownInMs != 0 ? (React__default["default"].createElement("div", { className: "ItemTooltip_cooldown" },
|
|
1280
|
-
"Cooldown: ",
|
|
1281
|
-
GetCooldownString(item.cooldownInMs))) : null,
|
|
1282
|
-
item.bgCooldownInMs != 0 ? (React__default["default"].createElement("div", { className: "ItemTooltip_cooldown" },
|
|
1283
|
-
"Battleground Reset Time: ",
|
|
1284
|
-
GetCooldownString(item.bgCooldownInMs))) : null));
|
|
1285
|
-
}
|
|
1286
|
-
function GetCooldownString(cooldownInMs) {
|
|
1287
|
-
var cooldownInS = cooldownInMs / 1000;
|
|
1288
|
-
if (cooldownInS >= 60) {
|
|
1289
|
-
var cooldownMins = Math.floor(cooldownInS / 60);
|
|
1290
|
-
var cooldownSecs = cooldownInS - cooldownMins * 60;
|
|
1291
|
-
var result = "";
|
|
1292
|
-
if (cooldownMins > 60) {
|
|
1293
|
-
var cooldownHs = Math.floor(cooldownMins / 60);
|
|
1294
|
-
cooldownMins = cooldownMins - cooldownHs * 60;
|
|
1295
|
-
result += "".concat(cooldownHs, " hr. ");
|
|
1296
|
-
}
|
|
1297
|
-
if (cooldownMins > 0) {
|
|
1298
|
-
result += "".concat(cooldownMins, " min. ");
|
|
1299
|
-
}
|
|
1300
|
-
if (cooldownSecs > 0) {
|
|
1301
|
-
result += "".concat(cooldownSecs, " sec. ");
|
|
1302
|
-
}
|
|
1303
|
-
result = result.trim();
|
|
1304
|
-
return result;
|
|
1305
|
-
}
|
|
1306
|
-
else {
|
|
1307
|
-
return "".concat(cooldownInS, " sec.");
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
function ItemStats(item) {
|
|
1312
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_stats" },
|
|
1313
|
-
item.stats
|
|
1314
|
-
.filter(function (x) { return x.isMainStat; })
|
|
1315
|
-
.map(function (mainStat, i) {
|
|
1316
|
-
if (mainStat.name.includes("-min"))
|
|
1317
|
-
return;
|
|
1318
|
-
var statValue = mainStat.value;
|
|
1319
|
-
//minmax
|
|
1320
|
-
if (mainStat.name.includes("-max")) {
|
|
1321
|
-
var minVal = item.stats.find(function (x) { return x.name === mainStat.name.replace("-max", "-min"); }).value;
|
|
1322
|
-
statValue = (mainStat.value + minVal) / 2;
|
|
1323
|
-
}
|
|
1324
|
-
return (React__default["default"].createElement("div", { key: mainStat.name + "_" + i, className: "ItemTooltip_stats_mainstat" },
|
|
1325
|
-
GetStatDisplayValue(statValue, mainStat.isPercentage),
|
|
1326
|
-
"\u00A0",
|
|
1327
|
-
ReplaceBossAndPvpAp(mainStat.name).replace("Max.", "").trim()));
|
|
1328
|
-
}),
|
|
1329
|
-
item.stats
|
|
1330
|
-
.filter(function (x) { return !x.isMainStat; })
|
|
1331
|
-
.map(function (subStat, i) {
|
|
1332
|
-
if (subStat.name.includes("-min"))
|
|
1333
|
-
return;
|
|
1334
|
-
var statValue = subStat.value;
|
|
1335
|
-
//minmax
|
|
1336
|
-
if (subStat.name.includes("-max")) {
|
|
1337
|
-
var minVal = item.stats.find(function (x) { return x.name === subStat.name.replace("-max", "-min"); }).value;
|
|
1338
|
-
statValue = (subStat.value + minVal) / 2;
|
|
1339
|
-
}
|
|
1340
|
-
return (React__default["default"].createElement("div", { key: subStat.name + "_" + i, className: "ItemTooltip_stats_substat" },
|
|
1341
|
-
GetStatDisplayValue(statValue, subStat.isPercentage),
|
|
1342
|
-
"\u00A0",
|
|
1343
|
-
ReplaceBossAndPvpAp(subStat.name).replace("Max.", "").trim()));
|
|
1344
|
-
})));
|
|
1345
|
-
}
|
|
1346
|
-
|
|
1347
|
-
function ItemRandomStats(item) {
|
|
1348
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_stats" }, item.randomStats.map(function (randomStat, i) {
|
|
1349
|
-
return (React__default["default"].createElement("div", { key: randomStat.name + "_" + i, className: randomStat.isMainStat
|
|
1350
|
-
? "ItemTooltip_stats_mainstat"
|
|
1351
|
-
: "ItemTooltip_stats_substat" },
|
|
1352
|
-
GetStatDisplayValue(randomStat.min, randomStat.isPercentage),
|
|
1353
|
-
"~",
|
|
1354
|
-
GetStatDisplayValue(randomStat.max, randomStat.isPercentage),
|
|
1355
|
-
"\u00A0",
|
|
1356
|
-
ReplaceBossAndPvpAp(randomStat.name),
|
|
1357
|
-
React__default["default"].createElement("img", { alt: "", className: "ItemTooltip_itemIconInline ItemTooltip_itemIconRandom", src: BuildIconPath("00015590/Tag_Random") })));
|
|
1358
|
-
})));
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
function GearScore(item) {
|
|
1362
|
-
return (React__default["default"].createElement("div", null,
|
|
1363
|
-
"debug-gs: ",
|
|
1364
|
-
item.gearScore,
|
|
1365
|
-
React__default["default"].createElement("br", null),
|
|
1366
|
-
"debug-is: ",
|
|
1367
|
-
item.itemScore,
|
|
1368
|
-
React__default["default"].createElement("br", null),
|
|
1369
|
-
"debug-fs: ",
|
|
1370
|
-
item.fusionScore));
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
function TopText(item) {
|
|
1374
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_toptext", dangerouslySetInnerHTML: { __html: item.topText } }));
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
function ItemSkillDescriptions(_a) {
|
|
1378
|
-
var item = _a.item, itemCombats = _a.itemCombats, jobstyle = _a.jobstyle;
|
|
1379
|
-
if (item.skills == null || item.skills.length == 0)
|
|
1380
|
-
return null;
|
|
1381
|
-
var computedSkills = item.skills;
|
|
1382
|
-
if (itemCombats) {
|
|
1383
|
-
computedSkills = computedSkills.filter(function (x) { return x.jobstyle === jobstyle; });
|
|
1384
|
-
}
|
|
1385
|
-
computedSkills = computedSkills.filter(function (x) { return x.description != null; });
|
|
1386
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_skilldescs 00008130.UI.Label_Green03_12" }, computedSkills.map(function (skill, i) { return (React__default["default"].createElement("div", { key: skill.title + "_" + i, dangerouslySetInnerHTML: { __html: skill.description } })); })));
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
function SkillModifierGroup(props) {
|
|
1390
|
-
var modifierGroup = props.modifierGroup;
|
|
1391
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null, modifierGroup.modifiers.map(function (modifier, i) { return (React__default["default"].createElement("div", { key: "modifier_" + i },
|
|
1392
|
-
modifier.skills.map(function (skill, i2) { return (React__default["default"].createElement(React__default["default"].Fragment, { key: skill.item2 + "_" + i + "_" + i2 },
|
|
1393
|
-
React__default["default"].createElement("span", { className: "00008130.UI.Vital_LightBlue", dangerouslySetInnerHTML: { __html: skill.item2 } }),
|
|
1394
|
-
i2 != modifier.skills.length - 1 ? React__default["default"].createElement(React__default["default"].Fragment, null, ",\u00A0") : null)); }),
|
|
1395
|
-
"\u00A0",
|
|
1396
|
-
GetTextForVerb(modifier.verb),
|
|
1397
|
-
"\u00A0",
|
|
1398
|
-
Math.abs(modifier.value) / 10,
|
|
1399
|
-
"%")); })));
|
|
1400
|
-
}
|
|
1401
|
-
function GetTextForVerb(verb) {
|
|
1402
|
-
if (verb === "percentDamage")
|
|
1403
|
-
return "Damage increases by";
|
|
1404
|
-
if (verb === "percentCD")
|
|
1405
|
-
return "Cooldown decreases by";
|
|
1406
|
-
return "";
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
function SkillModifiers(props) {
|
|
1410
|
-
var modifierGroups = props.skillModifierGroups;
|
|
1411
|
-
if (props.isSetBonus) {
|
|
1412
|
-
modifierGroups = modifierGroups.filter(function (x) { return x.jobstyle === props.jobstyle; });
|
|
1413
|
-
}
|
|
1414
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_skilldescs 00008130.UI.Label_Green03_12" }, modifierGroups.map(function (skillModifierGroup, i) { return (React__default["default"].createElement(SkillModifierGroup, { key: "skillModifierGroup_" + i, modifierGroup: skillModifierGroup })); })));
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
function SetBonusItems(setBonus) {
|
|
1418
|
-
var items = setBonus.setItems;
|
|
1419
|
-
if (items.length >= 8)
|
|
1420
|
-
return null;
|
|
1421
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_setItemsContainer" },
|
|
1422
|
-
React__default["default"].createElement("div", { className: "ItemTooltip_setItemsSubContainer" }, items.map(function (item, i) {
|
|
1423
|
-
return (React__default["default"].createElement("div", { key: item.itemName + "_" + i, className: "ItemTooltip_setItemIconNameDiv" },
|
|
1424
|
-
item.itemIcon != null ? (React__default["default"].createElement("img", { alt: "", className: "ItemTooltip_itemIconSmall", src: BuildIconPath(item.itemIcon.iconPath) })) : null,
|
|
1425
|
-
React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: item.itemName } })));
|
|
1426
|
-
}))));
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
function SetBonus(props) {
|
|
1430
|
-
var item = props.item, jobstyle = props.jobstyle;
|
|
1431
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_setBonus" },
|
|
1432
|
-
React__default["default"].createElement("div", null,
|
|
1433
|
-
item.setBonus.setName != "" ? (React__default["default"].createElement("div", { className: "00008130.UI.Vital_LightBlue", dangerouslySetInnerHTML: { __html: item.setBonus.setName } })) : null,
|
|
1434
|
-
React__default["default"].createElement(SetBonusItems, __assign({}, item.setBonus)),
|
|
1435
|
-
React__default["default"].createElement("div", { className: "ItemTooltip_setContainer" }, item.setBonus.setBonusStages
|
|
1436
|
-
.sort(function (a, b) { return a.setNumber - b.setNumber; })
|
|
1437
|
-
.map(function (setStage) { return (React__default["default"].createElement("div", { key: setStage.setNumber, className: "ItemTooltip_setStageContainer" },
|
|
1438
|
-
React__default["default"].createElement("div", null,
|
|
1439
|
-
React__default["default"].createElement("div", { className: "ItemTooltip_setStageNumber" },
|
|
1440
|
-
React__default["default"].createElement("span", null, setStage.setNumber))),
|
|
1441
|
-
React__default["default"].createElement("div", { className: "ItemTooltip_setStageContent 00008130.UI.Label_Green03_12" },
|
|
1442
|
-
setStage.effects.map(function (effect, i) { return (React__default["default"].createElement("div", { key: i, dangerouslySetInnerHTML: { __html: effect.description } })); }),
|
|
1443
|
-
React__default["default"].createElement(SkillModifiers, { jobstyle: jobstyle, isSetBonus: true, skillModifierGroups: setStage.skillModifiers })))); })))));
|
|
1444
|
-
}
|
|
1301
|
+
var css_248z$7 = ".tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:\"\";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}";
|
|
1302
|
+
styleInject(css_248z$7);
|
|
1445
1303
|
|
|
1446
|
-
var css_248z$
|
|
1447
|
-
styleInject(css_248z$
|
|
1304
|
+
var css_248z$6 = "";
|
|
1305
|
+
styleInject(css_248z$6);
|
|
1448
1306
|
|
|
1449
1307
|
var top = 'top';
|
|
1450
1308
|
var bottom = 'bottom';
|
|
@@ -1602,29 +1460,32 @@ function getBasePlacement$1(placement) {
|
|
|
1602
1460
|
return placement.split('-')[0];
|
|
1603
1461
|
}
|
|
1604
1462
|
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1463
|
+
var max = Math.max;
|
|
1464
|
+
var min = Math.min;
|
|
1465
|
+
var round = Math.round;
|
|
1466
|
+
|
|
1467
|
+
function getBoundingClientRect(element, includeScale) {
|
|
1468
|
+
if (includeScale === void 0) {
|
|
1469
|
+
includeScale = false;
|
|
1470
|
+
}
|
|
1608
1471
|
|
|
1609
1472
|
var rect = element.getBoundingClientRect();
|
|
1610
1473
|
var scaleX = 1;
|
|
1611
|
-
var scaleY = 1;
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
// }
|
|
1627
|
-
// }
|
|
1474
|
+
var scaleY = 1;
|
|
1475
|
+
|
|
1476
|
+
if (isHTMLElement(element) && includeScale) {
|
|
1477
|
+
var offsetHeight = element.offsetHeight;
|
|
1478
|
+
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
1479
|
+
// Fallback to 1 in case both values are `0`
|
|
1480
|
+
|
|
1481
|
+
if (offsetWidth > 0) {
|
|
1482
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
if (offsetHeight > 0) {
|
|
1486
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1628
1489
|
|
|
1629
1490
|
return {
|
|
1630
1491
|
width: rect.width / scaleX,
|
|
@@ -1743,6 +1604,10 @@ function getContainingBlock(element) {
|
|
|
1743
1604
|
|
|
1744
1605
|
var currentNode = getParentNode(element);
|
|
1745
1606
|
|
|
1607
|
+
if (isShadowRoot(currentNode)) {
|
|
1608
|
+
currentNode = currentNode.host;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1746
1611
|
while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
|
|
1747
1612
|
var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
|
|
1748
1613
|
// create a containing block.
|
|
@@ -1779,13 +1644,13 @@ function getMainAxisFromPlacement(placement) {
|
|
|
1779
1644
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
1780
1645
|
}
|
|
1781
1646
|
|
|
1782
|
-
var max = Math.max;
|
|
1783
|
-
var min = Math.min;
|
|
1784
|
-
var round = Math.round;
|
|
1785
|
-
|
|
1786
1647
|
function within(min$1, value, max$1) {
|
|
1787
1648
|
return max(min$1, min(value, max$1));
|
|
1788
1649
|
}
|
|
1650
|
+
function withinMaxClamp(min, value, max) {
|
|
1651
|
+
var v = within(min, value, max);
|
|
1652
|
+
return v > max ? max : v;
|
|
1653
|
+
}
|
|
1789
1654
|
|
|
1790
1655
|
function getFreshSideObject() {
|
|
1791
1656
|
return {
|
|
@@ -1917,8 +1782,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
1917
1782
|
var win = window;
|
|
1918
1783
|
var dpr = win.devicePixelRatio || 1;
|
|
1919
1784
|
return {
|
|
1920
|
-
x: round(
|
|
1921
|
-
y: round(
|
|
1785
|
+
x: round(x * dpr) / dpr || 0,
|
|
1786
|
+
y: round(y * dpr) / dpr || 0
|
|
1922
1787
|
};
|
|
1923
1788
|
}
|
|
1924
1789
|
|
|
@@ -1933,14 +1798,23 @@ function mapToStyles(_ref2) {
|
|
|
1933
1798
|
position = _ref2.position,
|
|
1934
1799
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
1935
1800
|
adaptive = _ref2.adaptive,
|
|
1936
|
-
roundOffsets = _ref2.roundOffsets
|
|
1937
|
-
|
|
1938
|
-
var
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1801
|
+
roundOffsets = _ref2.roundOffsets,
|
|
1802
|
+
isFixed = _ref2.isFixed;
|
|
1803
|
+
var _offsets$x = offsets.x,
|
|
1804
|
+
x = _offsets$x === void 0 ? 0 : _offsets$x,
|
|
1805
|
+
_offsets$y = offsets.y,
|
|
1806
|
+
y = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
1807
|
+
|
|
1808
|
+
var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
|
|
1809
|
+
x: x,
|
|
1810
|
+
y: y
|
|
1811
|
+
}) : {
|
|
1812
|
+
x: x,
|
|
1813
|
+
y: y
|
|
1814
|
+
};
|
|
1943
1815
|
|
|
1816
|
+
x = _ref3.x;
|
|
1817
|
+
y = _ref3.y;
|
|
1944
1818
|
var hasX = offsets.hasOwnProperty('x');
|
|
1945
1819
|
var hasY = offsets.hasOwnProperty('y');
|
|
1946
1820
|
var sideX = left;
|
|
@@ -1965,16 +1839,18 @@ function mapToStyles(_ref2) {
|
|
|
1965
1839
|
offsetParent = offsetParent;
|
|
1966
1840
|
|
|
1967
1841
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
1968
|
-
sideY = bottom;
|
|
1969
|
-
|
|
1970
|
-
|
|
1842
|
+
sideY = bottom;
|
|
1843
|
+
var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
1844
|
+
offsetParent[heightProp];
|
|
1845
|
+
y -= offsetY - popperRect.height;
|
|
1971
1846
|
y *= gpuAcceleration ? 1 : -1;
|
|
1972
1847
|
}
|
|
1973
1848
|
|
|
1974
1849
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
1975
|
-
sideX = right;
|
|
1976
|
-
|
|
1977
|
-
|
|
1850
|
+
sideX = right;
|
|
1851
|
+
var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
1852
|
+
offsetParent[widthProp];
|
|
1853
|
+
x -= offsetX - popperRect.width;
|
|
1978
1854
|
x *= gpuAcceleration ? 1 : -1;
|
|
1979
1855
|
}
|
|
1980
1856
|
}
|
|
@@ -1983,6 +1859,17 @@ function mapToStyles(_ref2) {
|
|
|
1983
1859
|
position: position
|
|
1984
1860
|
}, adaptive && unsetSides);
|
|
1985
1861
|
|
|
1862
|
+
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
1863
|
+
x: x,
|
|
1864
|
+
y: y
|
|
1865
|
+
}) : {
|
|
1866
|
+
x: x,
|
|
1867
|
+
y: y
|
|
1868
|
+
};
|
|
1869
|
+
|
|
1870
|
+
x = _ref4.x;
|
|
1871
|
+
y = _ref4.y;
|
|
1872
|
+
|
|
1986
1873
|
if (gpuAcceleration) {
|
|
1987
1874
|
var _Object$assign;
|
|
1988
1875
|
|
|
@@ -1992,9 +1879,9 @@ function mapToStyles(_ref2) {
|
|
|
1992
1879
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
1993
1880
|
}
|
|
1994
1881
|
|
|
1995
|
-
function computeStyles(
|
|
1996
|
-
var state =
|
|
1997
|
-
options =
|
|
1882
|
+
function computeStyles(_ref5) {
|
|
1883
|
+
var state = _ref5.state,
|
|
1884
|
+
options = _ref5.options;
|
|
1998
1885
|
var _options$gpuAccelerat = options.gpuAcceleration,
|
|
1999
1886
|
gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
|
|
2000
1887
|
_options$adaptive = options.adaptive,
|
|
@@ -2017,7 +1904,8 @@ function computeStyles(_ref4) {
|
|
|
2017
1904
|
variation: getVariation(state.placement),
|
|
2018
1905
|
popper: state.elements.popper,
|
|
2019
1906
|
popperRect: state.rects.popper,
|
|
2020
|
-
gpuAcceleration: gpuAcceleration
|
|
1907
|
+
gpuAcceleration: gpuAcceleration,
|
|
1908
|
+
isFixed: state.options.strategy === 'fixed'
|
|
2021
1909
|
};
|
|
2022
1910
|
|
|
2023
1911
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -2275,7 +2163,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
2275
2163
|
}
|
|
2276
2164
|
|
|
2277
2165
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
2278
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
2166
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement$1(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
2279
2167
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
2280
2168
|
// clipping (or hiding) overflowing elements with a position different from
|
|
2281
2169
|
// `initial`
|
|
@@ -2792,6 +2680,14 @@ function preventOverflow(_ref) {
|
|
|
2792
2680
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
2793
2681
|
placement: state.placement
|
|
2794
2682
|
})) : tetherOffset;
|
|
2683
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
2684
|
+
mainAxis: tetherOffsetValue,
|
|
2685
|
+
altAxis: tetherOffsetValue
|
|
2686
|
+
} : Object.assign({
|
|
2687
|
+
mainAxis: 0,
|
|
2688
|
+
altAxis: 0
|
|
2689
|
+
}, tetherOffsetValue);
|
|
2690
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
2795
2691
|
var data = {
|
|
2796
2692
|
x: 0,
|
|
2797
2693
|
y: 0
|
|
@@ -2801,13 +2697,15 @@ function preventOverflow(_ref) {
|
|
|
2801
2697
|
return;
|
|
2802
2698
|
}
|
|
2803
2699
|
|
|
2804
|
-
if (checkMainAxis
|
|
2700
|
+
if (checkMainAxis) {
|
|
2701
|
+
var _offsetModifierState$;
|
|
2702
|
+
|
|
2805
2703
|
var mainSide = mainAxis === 'y' ? top : left;
|
|
2806
2704
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
2807
2705
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
2808
2706
|
var offset = popperOffsets[mainAxis];
|
|
2809
|
-
var min$1 =
|
|
2810
|
-
var max$1 =
|
|
2707
|
+
var min$1 = offset + overflow[mainSide];
|
|
2708
|
+
var max$1 = offset - overflow[altSide];
|
|
2811
2709
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
2812
2710
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
2813
2711
|
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
@@ -2827,36 +2725,45 @@ function preventOverflow(_ref) {
|
|
|
2827
2725
|
// width or height)
|
|
2828
2726
|
|
|
2829
2727
|
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
2830
|
-
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin -
|
|
2831
|
-
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax +
|
|
2728
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
2729
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
2832
2730
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
2833
2731
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
2834
|
-
var offsetModifierValue =
|
|
2835
|
-
var tetherMin =
|
|
2836
|
-
var tetherMax =
|
|
2732
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
2733
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
2734
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
2735
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
2736
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
2737
|
+
data[mainAxis] = preventedOffset - offset;
|
|
2738
|
+
}
|
|
2837
2739
|
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
2841
|
-
data[mainAxis] = preventedOffset - offset;
|
|
2842
|
-
}
|
|
2740
|
+
if (checkAltAxis) {
|
|
2741
|
+
var _offsetModifierState$2;
|
|
2843
2742
|
|
|
2844
|
-
|
|
2845
|
-
var _mainSide = mainAxis === 'x' ? top : left;
|
|
2743
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
2846
2744
|
|
|
2847
|
-
|
|
2745
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
2848
2746
|
|
|
2849
|
-
|
|
2747
|
+
var _offset = popperOffsets[altAxis];
|
|
2850
2748
|
|
|
2851
|
-
|
|
2749
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
2852
2750
|
|
|
2853
|
-
|
|
2751
|
+
var _min = _offset + overflow[_mainSide];
|
|
2854
2752
|
|
|
2855
|
-
|
|
2753
|
+
var _max = _offset - overflow[_altSide];
|
|
2856
2754
|
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2755
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
2756
|
+
|
|
2757
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
2758
|
+
|
|
2759
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
2760
|
+
|
|
2761
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
2762
|
+
|
|
2763
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
2764
|
+
|
|
2765
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
2766
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
2860
2767
|
}
|
|
2861
2768
|
|
|
2862
2769
|
state.modifiersData[name] = data;
|
|
@@ -2888,8 +2795,8 @@ function getNodeScroll(node) {
|
|
|
2888
2795
|
|
|
2889
2796
|
function isElementScaled(element) {
|
|
2890
2797
|
var rect = element.getBoundingClientRect();
|
|
2891
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
2892
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
2798
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
2799
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
2893
2800
|
return scaleX !== 1 || scaleY !== 1;
|
|
2894
2801
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
2895
2802
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -2901,9 +2808,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
2901
2808
|
}
|
|
2902
2809
|
|
|
2903
2810
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
2904
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
2811
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
2905
2812
|
var documentElement = getDocumentElement(offsetParent);
|
|
2906
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
2813
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
2907
2814
|
var scroll = {
|
|
2908
2815
|
scrollLeft: 0,
|
|
2909
2816
|
scrollTop: 0
|
|
@@ -2920,7 +2827,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
2920
2827
|
}
|
|
2921
2828
|
|
|
2922
2829
|
if (isHTMLElement(offsetParent)) {
|
|
2923
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
2830
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
2924
2831
|
offsets.x += offsetParent.clientLeft;
|
|
2925
2832
|
offsets.y += offsetParent.clientTop;
|
|
2926
2833
|
} else if (documentElement) {
|
|
@@ -5568,13 +5475,216 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
|
|
|
5568
5475
|
|
|
5569
5476
|
var Tippy = index;
|
|
5570
5477
|
|
|
5571
|
-
var css_248z$
|
|
5478
|
+
var css_248z$5 = ".ItemImproveTooltip_option {\n margin: .2rem 0; }\n\n.ItemImproveTooltip_moneyContainer {\n padding: 0 0 0.15rem 0.33rem; }\n";
|
|
5479
|
+
styleInject(css_248z$5);
|
|
5480
|
+
|
|
5481
|
+
function ItemMainInfo(item) {
|
|
5482
|
+
if (item.mainInfo != null)
|
|
5483
|
+
return React__default["default"].createElement("div", { dangerouslySetInnerHTML: { __html: item.mainInfo } });
|
|
5484
|
+
return null;
|
|
5485
|
+
}
|
|
5486
|
+
|
|
5487
|
+
function ItemSubInfo(item) {
|
|
5488
|
+
if (item.subInfo != null)
|
|
5489
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_subInfo", dangerouslySetInnerHTML: {
|
|
5490
|
+
__html: ReplaceIconsInHtmlString(item.subInfo),
|
|
5491
|
+
} }));
|
|
5492
|
+
return null;
|
|
5493
|
+
}
|
|
5494
|
+
|
|
5495
|
+
function ItemSkillTitles(_a) {
|
|
5496
|
+
var item = _a.item, itemCombats = _a.itemCombats, jobstyle = _a.jobstyle;
|
|
5497
|
+
if (item.skills == null || item.skills.length == 0)
|
|
5498
|
+
return null;
|
|
5499
|
+
var computedSkills = item.skills;
|
|
5500
|
+
if (itemCombats) {
|
|
5501
|
+
computedSkills = computedSkills.filter(function (x) { return x.jobstyle === jobstyle; });
|
|
5502
|
+
}
|
|
5503
|
+
computedSkills = computedSkills.filter(function (x) { return x.title != null; });
|
|
5504
|
+
return (React__default["default"].createElement("div", null, computedSkills.map(function (itemSkill, i) { return (React__default["default"].createElement("div", { key: itemSkill.title + "_" + i, dangerouslySetInnerHTML: { __html: itemSkill.title } })); })));
|
|
5505
|
+
}
|
|
5506
|
+
|
|
5507
|
+
function ItemCooldowns(item) {
|
|
5508
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
5509
|
+
item.cooldownInMs != 0 ? (React__default["default"].createElement("div", { className: "ItemTooltip_cooldown" },
|
|
5510
|
+
"Cooldown: ",
|
|
5511
|
+
GetCooldownString(item.cooldownInMs))) : null,
|
|
5512
|
+
item.bgCooldownInMs != 0 ? (React__default["default"].createElement("div", { className: "ItemTooltip_cooldown" },
|
|
5513
|
+
"Battleground Reset Time: ",
|
|
5514
|
+
GetCooldownString(item.bgCooldownInMs))) : null));
|
|
5515
|
+
}
|
|
5516
|
+
function GetCooldownString(cooldownInMs) {
|
|
5517
|
+
var cooldownInS = cooldownInMs / 1000;
|
|
5518
|
+
if (cooldownInS >= 60) {
|
|
5519
|
+
var cooldownMins = Math.floor(cooldownInS / 60);
|
|
5520
|
+
var cooldownSecs = cooldownInS - cooldownMins * 60;
|
|
5521
|
+
var result = "";
|
|
5522
|
+
if (cooldownMins > 60) {
|
|
5523
|
+
var cooldownHs = Math.floor(cooldownMins / 60);
|
|
5524
|
+
cooldownMins = cooldownMins - cooldownHs * 60;
|
|
5525
|
+
result += "".concat(cooldownHs, " hr. ");
|
|
5526
|
+
}
|
|
5527
|
+
if (cooldownMins > 0) {
|
|
5528
|
+
result += "".concat(cooldownMins, " min. ");
|
|
5529
|
+
}
|
|
5530
|
+
if (cooldownSecs > 0) {
|
|
5531
|
+
result += "".concat(cooldownSecs, " sec. ");
|
|
5532
|
+
}
|
|
5533
|
+
result = result.trim();
|
|
5534
|
+
return result;
|
|
5535
|
+
}
|
|
5536
|
+
else {
|
|
5537
|
+
return "".concat(cooldownInS, " sec.");
|
|
5538
|
+
}
|
|
5539
|
+
}
|
|
5540
|
+
|
|
5541
|
+
function removeDuplicates(stats) {
|
|
5542
|
+
return stats.filter(function (value, index, self) {
|
|
5543
|
+
return index === self.findIndex(function (t) { return t.name === value.name; });
|
|
5544
|
+
});
|
|
5545
|
+
}
|
|
5546
|
+
function ItemStats(item) {
|
|
5547
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_stats" },
|
|
5548
|
+
removeDuplicates(item.stats)
|
|
5549
|
+
.filter(function (x) { return x.isMainStat; })
|
|
5550
|
+
.map(function (mainStat, i) {
|
|
5551
|
+
if (mainStat.name.includes("-min"))
|
|
5552
|
+
return;
|
|
5553
|
+
var statValue = mainStat.value;
|
|
5554
|
+
//minmax
|
|
5555
|
+
if (mainStat.name.includes("-max")) {
|
|
5556
|
+
var minVal = item.stats.find(function (x) { return x.name === mainStat.name.replace("-max", "-min"); }).value;
|
|
5557
|
+
statValue = (mainStat.value + minVal) / 2;
|
|
5558
|
+
}
|
|
5559
|
+
return (React__default["default"].createElement("div", { key: mainStat.name + "_" + i, className: "ItemTooltip_stats_mainstat" },
|
|
5560
|
+
GetStatDisplayValue(statValue, mainStat.isPercentage),
|
|
5561
|
+
"\u00A0",
|
|
5562
|
+
ReplaceBossAndPvpAp(mainStat.name).replace("Max.", "").trim()));
|
|
5563
|
+
}),
|
|
5564
|
+
removeDuplicates(item.stats)
|
|
5565
|
+
.filter(function (x) { return !x.isMainStat; })
|
|
5566
|
+
.map(function (subStat, i) {
|
|
5567
|
+
if (subStat.name.includes("-min"))
|
|
5568
|
+
return;
|
|
5569
|
+
var statValue = subStat.value;
|
|
5570
|
+
//minmax
|
|
5571
|
+
if (subStat.name.includes("-max")) {
|
|
5572
|
+
var minVal = item.stats.find(function (x) { return x.name === subStat.name.replace("-max", "-min"); }).value;
|
|
5573
|
+
statValue = (subStat.value + minVal) / 2;
|
|
5574
|
+
}
|
|
5575
|
+
return (React__default["default"].createElement("div", { key: subStat.name + "_" + i, className: "ItemTooltip_stats_substat" },
|
|
5576
|
+
GetStatDisplayValue(statValue, subStat.isPercentage),
|
|
5577
|
+
"\u00A0",
|
|
5578
|
+
ReplaceBossAndPvpAp(subStat.name).replace("Max.", "").trim()));
|
|
5579
|
+
})));
|
|
5580
|
+
}
|
|
5581
|
+
|
|
5582
|
+
function ItemRandomStats(item) {
|
|
5583
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_stats" }, item.randomStats.map(function (randomStat, i) {
|
|
5584
|
+
return (React__default["default"].createElement("div", { key: randomStat.name + "_" + i, className: randomStat.isMainStat
|
|
5585
|
+
? "ItemTooltip_stats_mainstat"
|
|
5586
|
+
: "ItemTooltip_stats_substat" },
|
|
5587
|
+
GetStatDisplayValue(randomStat.min, randomStat.isPercentage),
|
|
5588
|
+
"~",
|
|
5589
|
+
GetStatDisplayValue(randomStat.max, randomStat.isPercentage),
|
|
5590
|
+
"\u00A0",
|
|
5591
|
+
ReplaceBossAndPvpAp(randomStat.name),
|
|
5592
|
+
React__default["default"].createElement("img", { alt: "", className: "ItemTooltip_itemIconInline ItemTooltip_itemIconRandom", src: BuildIconPath("00015590/Tag_Random") })));
|
|
5593
|
+
})));
|
|
5594
|
+
}
|
|
5595
|
+
|
|
5596
|
+
function GearScore(item) {
|
|
5597
|
+
return (React__default["default"].createElement("div", null,
|
|
5598
|
+
"debug-gs: ",
|
|
5599
|
+
item.gearScore,
|
|
5600
|
+
React__default["default"].createElement("br", null),
|
|
5601
|
+
"debug-is: ",
|
|
5602
|
+
item.itemScore,
|
|
5603
|
+
React__default["default"].createElement("br", null),
|
|
5604
|
+
"debug-fs: ",
|
|
5605
|
+
item.fusionScore));
|
|
5606
|
+
}
|
|
5607
|
+
|
|
5608
|
+
function TopText(item) {
|
|
5609
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_toptext", dangerouslySetInnerHTML: { __html: item.topText } }));
|
|
5610
|
+
}
|
|
5611
|
+
|
|
5612
|
+
function ItemSkillDescriptions(_a) {
|
|
5613
|
+
var item = _a.item, itemCombats = _a.itemCombats, jobstyle = _a.jobstyle;
|
|
5614
|
+
if (item.skills == null || item.skills.length == 0)
|
|
5615
|
+
return null;
|
|
5616
|
+
var computedSkills = item.skills;
|
|
5617
|
+
if (itemCombats) {
|
|
5618
|
+
computedSkills = computedSkills.filter(function (x) { return x.jobstyle === jobstyle; });
|
|
5619
|
+
}
|
|
5620
|
+
computedSkills = computedSkills.filter(function (x) { return x.description != null; });
|
|
5621
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_skilldescs 00008130.UI.Label_Green03_12" }, computedSkills.map(function (skill, i) { return (React__default["default"].createElement("div", { key: skill.title + "_" + i, dangerouslySetInnerHTML: { __html: skill.description } })); })));
|
|
5622
|
+
}
|
|
5623
|
+
|
|
5624
|
+
function SkillModifierGroup(props) {
|
|
5625
|
+
var modifierGroup = props.modifierGroup;
|
|
5626
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null, modifierGroup.modifiers.map(function (modifier, i) { return (React__default["default"].createElement("div", { key: "modifier_" + i },
|
|
5627
|
+
modifier.skills.map(function (skill, i2) { return (React__default["default"].createElement(React__default["default"].Fragment, { key: skill.item2 + "_" + i + "_" + i2 },
|
|
5628
|
+
React__default["default"].createElement("span", { className: "00008130.UI.Vital_LightBlue", dangerouslySetInnerHTML: { __html: skill.item2 } }),
|
|
5629
|
+
i2 != modifier.skills.length - 1 ? React__default["default"].createElement(React__default["default"].Fragment, null, ",\u00A0") : null)); }),
|
|
5630
|
+
"\u00A0",
|
|
5631
|
+
GetTextForVerb(modifier.verb),
|
|
5632
|
+
"\u00A0",
|
|
5633
|
+
Math.abs(modifier.value) / 10,
|
|
5634
|
+
"%")); })));
|
|
5635
|
+
}
|
|
5636
|
+
function GetTextForVerb(verb) {
|
|
5637
|
+
if (verb === "percentDamage")
|
|
5638
|
+
return "Damage increases by";
|
|
5639
|
+
if (verb === "percentCD")
|
|
5640
|
+
return "Cooldown decreases by";
|
|
5641
|
+
return "";
|
|
5642
|
+
}
|
|
5643
|
+
|
|
5644
|
+
function SkillModifiers(props) {
|
|
5645
|
+
var modifierGroups = props.skillModifierGroups;
|
|
5646
|
+
if (props.isSetBonus) {
|
|
5647
|
+
modifierGroups = modifierGroups.filter(function (x) { return x.jobstyle === props.jobstyle; });
|
|
5648
|
+
}
|
|
5649
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_skilldescs 00008130.UI.Label_Green03_12" }, modifierGroups.map(function (skillModifierGroup, i) { return (React__default["default"].createElement(SkillModifierGroup, { key: "skillModifierGroup_" + i, modifierGroup: skillModifierGroup })); })));
|
|
5650
|
+
}
|
|
5651
|
+
|
|
5652
|
+
function SetBonusItems(setBonus) {
|
|
5653
|
+
var items = setBonus.setItems;
|
|
5654
|
+
if (items.length >= 8)
|
|
5655
|
+
return null;
|
|
5656
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_setItemsContainer" },
|
|
5657
|
+
React__default["default"].createElement("div", { className: "ItemTooltip_setItemsSubContainer" }, items.map(function (item, i) {
|
|
5658
|
+
return (React__default["default"].createElement("div", { key: item.itemName + "_" + i, className: "ItemTooltip_setItemIconNameDiv" },
|
|
5659
|
+
item.itemIcon != null ? (React__default["default"].createElement("img", { alt: "", className: "ItemTooltip_itemIconSmall", src: BuildIconPath(item.itemIcon.iconPath) })) : null,
|
|
5660
|
+
React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: item.itemName } })));
|
|
5661
|
+
}))));
|
|
5662
|
+
}
|
|
5663
|
+
|
|
5664
|
+
function SetBonus(props) {
|
|
5665
|
+
var item = props.item, jobstyle = props.jobstyle;
|
|
5666
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_setBonus" },
|
|
5667
|
+
React__default["default"].createElement("div", null,
|
|
5668
|
+
item.setBonus.setName != "" ? (React__default["default"].createElement("div", { className: "00008130.UI.Vital_LightBlue", dangerouslySetInnerHTML: { __html: item.setBonus.setName } })) : null,
|
|
5669
|
+
React__default["default"].createElement(SetBonusItems, __assign({}, item.setBonus)),
|
|
5670
|
+
React__default["default"].createElement("div", { className: "ItemTooltip_setContainer" }, item.setBonus.setBonusStages
|
|
5671
|
+
.sort(function (a, b) { return a.setNumber - b.setNumber; })
|
|
5672
|
+
.map(function (setStage) { return (React__default["default"].createElement("div", { key: setStage.setNumber, className: "ItemTooltip_setStageContainer" },
|
|
5673
|
+
React__default["default"].createElement("div", null,
|
|
5674
|
+
React__default["default"].createElement("div", { className: "ItemTooltip_setStageNumber" },
|
|
5675
|
+
React__default["default"].createElement("span", null, setStage.setNumber))),
|
|
5676
|
+
React__default["default"].createElement("div", { className: "ItemTooltip_setStageContent 00008130.UI.Label_Green03_12" },
|
|
5677
|
+
setStage.effects.map(function (effect, i) { return (React__default["default"].createElement("div", { key: i, dangerouslySetInnerHTML: { __html: effect.description } })); }),
|
|
5678
|
+
React__default["default"].createElement(SkillModifiers, { jobstyle: jobstyle, isSetBonus: true, skillModifierGroups: setStage.skillModifiers })))); })))));
|
|
5679
|
+
}
|
|
5680
|
+
|
|
5681
|
+
var css_248z$4 = ".tippy-box {\n max-width: none !important;\n background-color: transparent !important;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important; }\n .tippy-box:hover {\n box-shadow: black 0px 20px 60px 0px !important; }\n\n.tippy-content {\n padding: 0 !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff0084 !important; }\n";
|
|
5572
5682
|
styleInject(css_248z$4);
|
|
5573
5683
|
|
|
5574
5684
|
var ItemTooltipWrapper = function (_a) {
|
|
5575
|
-
var data = _a.data, region = _a.region, children = _a.children, client = _a.client, _b = _a.
|
|
5685
|
+
var data = _a.data, region = _a.region, children = _a.children, client = _a.client, _b = _a.showUpgrade, showUpgrade = _b === void 0 ? false : _b, _c = _a.offline, offline = _c === void 0 ? false : _c, _d = _a.interactive, interactive = _d === void 0 ? true : _d, _e = _a.placement, placement = _e === void 0 ? "right" : _e, _f = _a.debug, debug = _f === void 0 ? false : _f, jobstyleOverride = _a.jobstyleOverride, _g = _a.followCursor, followCursor$1 = _g === void 0 ? false : _g, _h = _a.trigger, trigger = _h === void 0 ? "mouseenter focus" : _h, _j = _a.showArrow, showArrow = _j === void 0 ? true : _j;
|
|
5576
5686
|
var spanRef = React.useRef(null);
|
|
5577
|
-
var
|
|
5687
|
+
var _k = React.useState(null), childRef = _k[0], setChildRef = _k[1];
|
|
5578
5688
|
/**
|
|
5579
5689
|
* Mount the temporary span element.
|
|
5580
5690
|
* retrieve and store the target element's reference.
|
|
@@ -5585,16 +5695,16 @@ var ItemTooltipWrapper = function (_a) {
|
|
|
5585
5695
|
}
|
|
5586
5696
|
return function () { return setChildRef(null); };
|
|
5587
5697
|
}, []);
|
|
5588
|
-
var
|
|
5698
|
+
var _l = React.useState(true), isOffline = _l[0], setIsOffline = _l[1];
|
|
5589
5699
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
5590
5700
|
children,
|
|
5591
|
-
childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, onMount: function () { return setIsOffline(offline); }, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(ItemTooltip, { region: region, jobstyleOverride: jobstyleOverride, data: data, offline: isOffline, client: client, debug: debug }), theme: "grade" + data.grade, reference: childRef })) : (React__default["default"].createElement("span", { ref: spanRef, style: { display: "none" } }))));
|
|
5701
|
+
childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, onMount: function () { return setIsOffline(offline); }, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(ItemTooltip, { region: region, jobstyleOverride: jobstyleOverride, data: data, offline: isOffline, client: client, showUpgrade: showUpgrade, debug: debug }), theme: "grade" + data.grade, reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
5592
5702
|
};
|
|
5593
5703
|
|
|
5594
5704
|
function ItemIconNameDiv(_a) {
|
|
5595
5705
|
var _this = this;
|
|
5596
5706
|
var _b;
|
|
5597
|
-
var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c;
|
|
5707
|
+
var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c, trigger = _a.trigger, interactive = _a.interactive, showUpgrade = _a.showUpgrade;
|
|
5598
5708
|
var _d = React.useState(), itemData = _d[0], setItemData = _d[1];
|
|
5599
5709
|
React.useEffect(function () {
|
|
5600
5710
|
if (client)
|
|
@@ -5615,7 +5725,7 @@ function ItemIconNameDiv(_a) {
|
|
|
5615
5725
|
if (itemData) {
|
|
5616
5726
|
if (itemData.grade != 0)
|
|
5617
5727
|
return (React__default["default"].createElement("div", { className: "ItemTooltip_itemiconnamediv" },
|
|
5618
|
-
React__default["default"].createElement(ItemTooltipWrapper, { region: region, client: client, data: itemData },
|
|
5728
|
+
React__default["default"].createElement(ItemTooltipWrapper, { showUpgrade: showUpgrade, region: region, client: client, data: itemData, trigger: trigger, interactive: interactive },
|
|
5619
5729
|
React__default["default"].createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
|
|
5620
5730
|
React__default["default"].createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
|
|
5621
5731
|
React__default["default"].createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
|
|
@@ -5644,7 +5754,7 @@ function DecomposeResults(props) {
|
|
|
5644
5754
|
.filter(function (x) { return x != null; })
|
|
5645
5755
|
.map(function (item, i) {
|
|
5646
5756
|
return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: item.itemId + "-" + item.itemLevel + "_" + i },
|
|
5647
|
-
React__default["default"].createElement(ItemIconNameDiv, { region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
|
|
5757
|
+
React__default["default"].createElement(ItemIconNameDiv, { showUpgrade: props.showUpgrade, region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
|
|
5648
5758
|
item.isRandom ? null : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
5649
5759
|
"\u00A0",
|
|
5650
5760
|
item.isMinMax ? (React__default["default"].createElement("span", null, GetRangeString(item.min, item.max))) : (React__default["default"].createElement("span", null, GetRangeString(item.min)))))));
|
|
@@ -5697,7 +5807,7 @@ function SealingResult(_a) {
|
|
|
5697
5807
|
return (React__default["default"].createElement("div", null, item.sealing.sealConsumeItems
|
|
5698
5808
|
.filter(function (x) { return x.min != 0; })
|
|
5699
5809
|
.map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
|
|
5700
|
-
React__default["default"].createElement(ItemIconNameDiv, { region: region, item: consumeItem, client: client }),
|
|
5810
|
+
React__default["default"].createElement(ItemIconNameDiv, { showUpgrade: false, region: region, item: consumeItem, client: client }),
|
|
5701
5811
|
"\u00A0",
|
|
5702
5812
|
GetRangeString(consumeItem.min))); })));
|
|
5703
5813
|
}
|
|
@@ -5706,7 +5816,7 @@ function AccountTransfer(_a) {
|
|
|
5706
5816
|
var item = _a.item, client = _a.client, region = _a.region;
|
|
5707
5817
|
return (React__default["default"].createElement("div", null,
|
|
5708
5818
|
item.accountTransfer.requiredItems.map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
|
|
5709
|
-
React__default["default"].createElement(ItemIconNameDiv, { region: region, client: client, item: consumeItem }),
|
|
5819
|
+
React__default["default"].createElement(ItemIconNameDiv, { showUpgrade: false, region: region, client: client, item: consumeItem }),
|
|
5710
5820
|
"\u00A0",
|
|
5711
5821
|
GetRangeString(consumeItem.min))); }),
|
|
5712
5822
|
item.accountTransfer.moneyCost != null &&
|
|
@@ -5715,12 +5825,146 @@ function AccountTransfer(_a) {
|
|
|
5715
5825
|
"\u00A0copper")) : null));
|
|
5716
5826
|
}
|
|
5717
5827
|
|
|
5828
|
+
function Money(_a) {
|
|
5829
|
+
var money = _a.money;
|
|
5830
|
+
var bnsmoney = getMoneyObj(money);
|
|
5831
|
+
if (bnsmoney == null)
|
|
5832
|
+
return null;
|
|
5833
|
+
return (React__default["default"].createElement("div", { className: "NpcTooltip_moneyContainer" },
|
|
5834
|
+
bnsmoney.Gold > 0 ? (React__default["default"].createElement("span", null,
|
|
5835
|
+
bnsmoney.Gold,
|
|
5836
|
+
React__default["default"].createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
|
|
5837
|
+
bnsmoney.Silver > 0 ? (React__default["default"].createElement("span", null,
|
|
5838
|
+
bnsmoney.Silver,
|
|
5839
|
+
React__default["default"].createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
|
|
5840
|
+
bnsmoney.Copper > 0 ? (React__default["default"].createElement("span", null,
|
|
5841
|
+
bnsmoney.Copper,
|
|
5842
|
+
React__default["default"].createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
|
|
5843
|
+
}
|
|
5844
|
+
|
|
5845
|
+
function ItemImproveTooltip(_a) {
|
|
5846
|
+
var _this = this;
|
|
5847
|
+
var data = _a.data, region = _a.region; _a.debug; var _c = _a.offline, offline = _c === void 0 ? false : _c, clientProp = _a.client, _d = _a.fullHeight, fullHeight = _d === void 0 ? false : _d;
|
|
5848
|
+
var _e = React.useState(), client = _e[0], setClient = _e[1];
|
|
5849
|
+
React.useEffect(function () {
|
|
5850
|
+
if (offline)
|
|
5851
|
+
return;
|
|
5852
|
+
if (clientProp == undefined) {
|
|
5853
|
+
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5854
|
+
return __generator(this, function (_a) {
|
|
5855
|
+
setClient(new ItemDownloadClient(region));
|
|
5856
|
+
return [2 /*return*/];
|
|
5857
|
+
});
|
|
5858
|
+
}); })();
|
|
5859
|
+
}
|
|
5860
|
+
else {
|
|
5861
|
+
setClient(clientProp);
|
|
5862
|
+
}
|
|
5863
|
+
}, [offline]);
|
|
5864
|
+
var tooltipBaseProps = {
|
|
5865
|
+
title: "Item Upgrade",
|
|
5866
|
+
grade: 4,
|
|
5867
|
+
id: "item_upgrade_info",
|
|
5868
|
+
icon: "",
|
|
5869
|
+
subtitle: "Info",
|
|
5870
|
+
mainInfos: [],
|
|
5871
|
+
subInfoGroups: [],
|
|
5872
|
+
fullHeight: fullHeight,
|
|
5873
|
+
};
|
|
5874
|
+
if (!offline) {
|
|
5875
|
+
if (data.itemNext != null && data.upgradeOptions != null && data.upgradeOptions.length > 0) {
|
|
5876
|
+
if (data.useMileageSave != null && data.useMileageSave === true && data.upgradeOptions.find(function (x) { return x.isRandom; }) != null)
|
|
5877
|
+
tooltipBaseProps.mainInfos.push(React__default["default"].createElement("div", null, "The upgrade chance is 100% when the pity meter is filled."));
|
|
5878
|
+
// if (data.itemPrev != null) {
|
|
5879
|
+
// tooltipBaseProps.subInfoGroups.push({
|
|
5880
|
+
// title: "Previous Upgrade:",
|
|
5881
|
+
// texts: [
|
|
5882
|
+
// <ItemIconNameDiv showUpgrade={true} client={client} region={region} item={data.itemPrev} interactive={true} />
|
|
5883
|
+
// ]
|
|
5884
|
+
// });
|
|
5885
|
+
// }
|
|
5886
|
+
tooltipBaseProps.subInfoGroups.push({
|
|
5887
|
+
title: "Next Upgrade:",
|
|
5888
|
+
texts: [
|
|
5889
|
+
React__default["default"].createElement(ItemIconNameDiv, { showUpgrade: true, client: client, region: region, item: data.itemNext, interactive: true })
|
|
5890
|
+
]
|
|
5891
|
+
});
|
|
5892
|
+
data.upgradeOptions.forEach(function (upgradeOption, i, _) {
|
|
5893
|
+
var costGroup = {
|
|
5894
|
+
title: "Upgrade option " + (i + 1) + ":",
|
|
5895
|
+
texts: []
|
|
5896
|
+
};
|
|
5897
|
+
if (upgradeOption.isRandom != null && upgradeOption.isRandom === true) {
|
|
5898
|
+
costGroup.texts.push(React__default["default"].createElement("div", { className: "TooltipBase_flex ItemImproveTooltip_moneyContainer" },
|
|
5899
|
+
React__default["default"].createElement("span", { className: "TooltipBase_grade-8" }, "This option has a chance to fail!")));
|
|
5900
|
+
}
|
|
5901
|
+
if (upgradeOption.mainItemCost != null)
|
|
5902
|
+
costGroup.texts.push(React__default["default"].createElement(ItemIconNameDiv, { showUpgrade: false, client: client, region: region, item: upgradeOption.mainItemCost, interactive: true }));
|
|
5903
|
+
if (upgradeOption.subItemCost != null && upgradeOption.subItemCost.length > 0) {
|
|
5904
|
+
costGroup.texts.push(React__default["default"].createElement(DecomposeResults, { client: client, region: region, showUpgrade: false, items: upgradeOption.subItemCost }));
|
|
5905
|
+
}
|
|
5906
|
+
if (upgradeOption.moneyCost != null && upgradeOption.moneyCost > 0) {
|
|
5907
|
+
costGroup.texts.push(React__default["default"].createElement("div", { className: "TooltipBase_flex ItemImproveTooltip_moneyContainer" },
|
|
5908
|
+
React__default["default"].createElement("span", { className: "TooltipBase_grade-6" }, "Money:\u00A0"),
|
|
5909
|
+
React__default["default"].createElement(Money, { money: upgradeOption.moneyCost })));
|
|
5910
|
+
}
|
|
5911
|
+
tooltipBaseProps.subInfoGroups.push(costGroup);
|
|
5912
|
+
});
|
|
5913
|
+
}
|
|
5914
|
+
}
|
|
5915
|
+
if (data.bonusEffectOptions != null && data.bonusEffectOptions.length > 0) {
|
|
5916
|
+
tooltipBaseProps.mainInfos.push(React__default["default"].createElement("div", null, "Random effects can be obtained when upgrading."));
|
|
5917
|
+
var subInfoGroupStats_1 = {
|
|
5918
|
+
title: "Possible Stats:",
|
|
5919
|
+
texts: []
|
|
5920
|
+
};
|
|
5921
|
+
var subInfoGroupEffects_1 = {
|
|
5922
|
+
title: "Possible Effects:",
|
|
5923
|
+
texts: []
|
|
5924
|
+
};
|
|
5925
|
+
data.bonusEffectOptions.forEach(function (option) {
|
|
5926
|
+
if (option.isEffect) {
|
|
5927
|
+
subInfoGroupEffects_1.texts.push(React__default["default"].createElement("div", { className: "ItemImproveTooltip_option", dangerouslySetInnerHTML: { __html: option.effectDescription } }));
|
|
5928
|
+
}
|
|
5929
|
+
else {
|
|
5930
|
+
subInfoGroupStats_1.texts.push(React__default["default"].createElement("div", { className: "ItemImproveTooltip_option 00008130.Program.Fontset_Chatting_Color_19" },
|
|
5931
|
+
option.statValue,
|
|
5932
|
+
"\u00A0",
|
|
5933
|
+
React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: option.statName } })));
|
|
5934
|
+
}
|
|
5935
|
+
});
|
|
5936
|
+
tooltipBaseProps.subInfoGroups.push(subInfoGroupStats_1);
|
|
5937
|
+
tooltipBaseProps.subInfoGroups.push(subInfoGroupEffects_1);
|
|
5938
|
+
}
|
|
5939
|
+
return (React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps)));
|
|
5940
|
+
}
|
|
5941
|
+
|
|
5942
|
+
var ItemImproveTooltipWrapper = function (_a) {
|
|
5943
|
+
var data = _a.data, region = _a.region, children = _a.children, client = _a.client, _b = _a.offline, offline = _b === void 0 ? false : _b, _c = _a.interactive, interactive = _c === void 0 ? true : _c, _d = _a.placement, placement = _d === void 0 ? "right" : _d, _e = _a.debug, debug = _e === void 0 ? false : _e, _f = _a.followCursor, followCursor$1 = _f === void 0 ? false : _f, _g = _a.trigger, trigger = _g === void 0 ? "mouseenter focus" : _g, _h = _a.showArrow, showArrow = _h === void 0 ? true : _h;
|
|
5944
|
+
var spanRef = React.useRef(null);
|
|
5945
|
+
var _j = React.useState(null), childRef = _j[0], setChildRef = _j[1];
|
|
5946
|
+
/**
|
|
5947
|
+
* Mount the temporary span element.
|
|
5948
|
+
* retrieve and store the target element's reference.
|
|
5949
|
+
*/
|
|
5950
|
+
React.useEffect(function () {
|
|
5951
|
+
if (spanRef.current) {
|
|
5952
|
+
setChildRef(spanRef.current.previousElementSibling);
|
|
5953
|
+
}
|
|
5954
|
+
return function () { return setChildRef(null); };
|
|
5955
|
+
}, []);
|
|
5956
|
+
var _k = React.useState(true), isOffline = _k[0], setIsOffline = _k[1];
|
|
5957
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
5958
|
+
children,
|
|
5959
|
+
childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, onMount: function () { return setIsOffline(offline); }, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(ItemImproveTooltip, { region: region, data: data, offline: isOffline, client: client, debug: debug }), theme: "grade4", reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
5960
|
+
};
|
|
5961
|
+
|
|
5718
5962
|
function ItemTooltip(_a) {
|
|
5719
5963
|
var _this = this;
|
|
5720
5964
|
var _b, _c, _d;
|
|
5721
|
-
var data = _a.data, region = _a.region, _e = _a.debug, debug = _e === void 0 ? false : _e, _f = _a.offline, offline = _f === void 0 ? false : _f, clientProp = _a.client, jobstyleOverride = _a.jobstyleOverride, _g = _a.fullHeight, fullHeight =
|
|
5722
|
-
var
|
|
5723
|
-
var
|
|
5965
|
+
var data = _a.data, region = _a.region, _e = _a.debug, debug = _e === void 0 ? false : _e, _f = _a.offline, offline = _f === void 0 ? false : _f, clientProp = _a.client, jobstyleOverride = _a.jobstyleOverride, _g = _a.showUpgrade, showUpgrade = _g === void 0 ? false : _g, _h = _a.fullHeight, fullHeight = _h === void 0 ? false : _h;
|
|
5966
|
+
var _j = React.useState("advanced-1"), jobstyle = _j[0], setJobstyle = _j[1];
|
|
5967
|
+
var _k = React.useState(), client = _k[0], setClient = _k[1];
|
|
5724
5968
|
React.useEffect(function () {
|
|
5725
5969
|
if (offline)
|
|
5726
5970
|
return;
|
|
@@ -5793,6 +6037,8 @@ function ItemTooltip(_a) {
|
|
|
5793
6037
|
AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
|
|
5794
6038
|
AddTopText(tooltipBaseProps.subInfoGroups, item);
|
|
5795
6039
|
AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
|
|
6040
|
+
if (showUpgrade)
|
|
6041
|
+
AddItemImprove(tooltipBaseProps.subInfoGroups, item, region, client, offline, debug);
|
|
5796
6042
|
AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
|
|
5797
6043
|
AddSetBonus(tooltipBaseProps.subInfoGroups, item, jobstyle);
|
|
5798
6044
|
if (!offline) {
|
|
@@ -5899,21 +6145,21 @@ function AddDecomposeResults(subInfoGroups, item, client, region) {
|
|
|
5899
6145
|
subInfoGroups.push({
|
|
5900
6146
|
title: "Guaranteed/Salvage:",
|
|
5901
6147
|
texts: [
|
|
5902
|
-
React__default["default"].createElement(DecomposeResults, { region: region, items: fixedItems, client: client }),
|
|
6148
|
+
React__default["default"].createElement(DecomposeResults, { showUpgrade: false, region: region, items: fixedItems, client: client }),
|
|
5903
6149
|
],
|
|
5904
6150
|
});
|
|
5905
6151
|
if (randomItems.length > 0)
|
|
5906
6152
|
subInfoGroups.push({
|
|
5907
6153
|
title: "Random:",
|
|
5908
6154
|
texts: [
|
|
5909
|
-
React__default["default"].createElement(DecomposeResults, { region: region, items: randomItems, client: client }),
|
|
6155
|
+
React__default["default"].createElement(DecomposeResults, { showUpgrade: false, region: region, items: randomItems, client: client }),
|
|
5910
6156
|
],
|
|
5911
6157
|
});
|
|
5912
6158
|
if (selectItems.length > 0)
|
|
5913
6159
|
subInfoGroups.push({
|
|
5914
6160
|
title: "Select:",
|
|
5915
6161
|
texts: [
|
|
5916
|
-
React__default["default"].createElement(DecomposeResults, { region: region, items: selectItems, client: client }),
|
|
6162
|
+
React__default["default"].createElement(DecomposeResults, { showUpgrade: false, region: region, items: selectItems, client: client }),
|
|
5917
6163
|
],
|
|
5918
6164
|
});
|
|
5919
6165
|
}
|
|
@@ -6030,6 +6276,19 @@ function AddUnityPoints(subInfoGroups, item) {
|
|
|
6030
6276
|
item.refinementPoints),
|
|
6031
6277
|
],
|
|
6032
6278
|
});
|
|
6279
|
+
}
|
|
6280
|
+
function AddItemImprove(subInfoGroups, item, region, client, offline, debug) {
|
|
6281
|
+
if (item.itemImprove == null)
|
|
6282
|
+
return;
|
|
6283
|
+
var subInfoGroup = {
|
|
6284
|
+
title: "Upgrade Options:",
|
|
6285
|
+
texts: [
|
|
6286
|
+
React__default["default"].createElement("div", { className: "ItemTooltip_optionPadding" },
|
|
6287
|
+
React__default["default"].createElement(ItemImproveTooltipWrapper, { data: item.itemImprove, region: region, trigger: "click", interactive: true, offline: offline, client: client, debug: debug },
|
|
6288
|
+
React__default["default"].createElement("span", { className: "ItemTooltip_showButton" }, "Click to open")))
|
|
6289
|
+
]
|
|
6290
|
+
};
|
|
6291
|
+
subInfoGroups.push(subInfoGroup);
|
|
6033
6292
|
}
|
|
6034
6293
|
|
|
6035
6294
|
var css_248z$3 = "";
|
|
@@ -6365,7 +6624,7 @@ var SkillTooltipWrapper = function (_a) {
|
|
|
6365
6624
|
}, []);
|
|
6366
6625
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
6367
6626
|
children,
|
|
6368
|
-
childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(SkillTooltip, { data: data, debug: false }), theme: "grade" + 4, reference: childRef })) : (React__default["default"].createElement("span", { ref: spanRef, style: { display: "none" } }))));
|
|
6627
|
+
childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(SkillTooltip, { data: data, debug: false }), theme: "grade" + 4, reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
6369
6628
|
};
|
|
6370
6629
|
|
|
6371
6630
|
exports.ServerRegion = void 0;
|
|
@@ -6436,23 +6695,6 @@ function GetStringForBuyLimitReset(reset) {
|
|
|
6436
6695
|
}
|
|
6437
6696
|
}
|
|
6438
6697
|
|
|
6439
|
-
function Money(_a) {
|
|
6440
|
-
var money = _a.money;
|
|
6441
|
-
var bnsmoney = getMoneyObj(money);
|
|
6442
|
-
if (bnsmoney == null)
|
|
6443
|
-
return null;
|
|
6444
|
-
return (React__default["default"].createElement("div", { className: "NpcTooltip_moneyContainer" },
|
|
6445
|
-
bnsmoney.Gold > 0 ? (React__default["default"].createElement("span", null,
|
|
6446
|
-
bnsmoney.Gold,
|
|
6447
|
-
React__default["default"].createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
|
|
6448
|
-
bnsmoney.Silver > 0 ? (React__default["default"].createElement("span", null,
|
|
6449
|
-
bnsmoney.Silver,
|
|
6450
|
-
React__default["default"].createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
|
|
6451
|
-
bnsmoney.Copper > 0 ? (React__default["default"].createElement("span", null,
|
|
6452
|
-
bnsmoney.Copper,
|
|
6453
|
-
React__default["default"].createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
|
|
6454
|
-
}
|
|
6455
|
-
|
|
6456
6698
|
function StoreItemBuyPriceEntry(_a) {
|
|
6457
6699
|
var _this = this;
|
|
6458
6700
|
var itemRef = _a.itemRef, client = _a.client;
|
|
@@ -6557,11 +6799,13 @@ function NpcTooltip(_a) {
|
|
|
6557
6799
|
subInfoGroups: [],
|
|
6558
6800
|
};
|
|
6559
6801
|
//no top part
|
|
6560
|
-
AddStoreToggles(tooltipBaseProps.subInfoGroups,
|
|
6561
|
-
AddStores(tooltipBaseProps.subInfoGroups,
|
|
6802
|
+
AddStoreToggles(tooltipBaseProps.subInfoGroups, activeTab, setActiveTab, npc.Stores);
|
|
6803
|
+
AddStores(tooltipBaseProps.subInfoGroups, activeTab, client, npc.Stores);
|
|
6562
6804
|
return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
|
|
6563
6805
|
}
|
|
6564
|
-
function AddStoreToggles(subInfoGroups,
|
|
6806
|
+
function AddStoreToggles(subInfoGroups, activeTab, setActiveTab, Stores) {
|
|
6807
|
+
if (Stores == null || Stores.length <= 0)
|
|
6808
|
+
return;
|
|
6565
6809
|
subInfoGroups.push({
|
|
6566
6810
|
title: "",
|
|
6567
6811
|
texts: [
|
|
@@ -6569,7 +6813,9 @@ function AddStoreToggles(subInfoGroups, Stores, activeTab, setActiveTab) {
|
|
|
6569
6813
|
],
|
|
6570
6814
|
});
|
|
6571
6815
|
}
|
|
6572
|
-
function AddStores(subInfoGroups,
|
|
6816
|
+
function AddStores(subInfoGroups, activeTab, client, Stores) {
|
|
6817
|
+
if (Stores == null || Stores.length <= 0)
|
|
6818
|
+
return;
|
|
6573
6819
|
subInfoGroups.push({
|
|
6574
6820
|
title: "",
|
|
6575
6821
|
texts: [
|
|
@@ -6579,6 +6825,8 @@ function AddStores(subInfoGroups, Stores, activeTab, client) {
|
|
|
6579
6825
|
}
|
|
6580
6826
|
|
|
6581
6827
|
exports.GetCooldownString = GetCooldownString;
|
|
6828
|
+
exports.ItemImproveTooltip = ItemImproveTooltip;
|
|
6829
|
+
exports.ItemImproveTooltipWrapper = ItemImproveTooltipWrapper;
|
|
6582
6830
|
exports.ItemTooltip = ItemTooltip;
|
|
6583
6831
|
exports.ItemTooltipWrapper = ItemTooltipWrapper;
|
|
6584
6832
|
exports.JsonTooltip = JsonTooltip;
|