@kitten-science/kitten-scientists 2.0.0-beta.10-20250402-4e11d20 → 2.0.0-beta.10-dev-2a02d77
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/lib/KittenScientists.d.ts +1 -1
- package/lib/KittenScientists.d.ts.map +1 -1
- package/lib/KittenScientists.js +6 -6
- package/lib/KittenScientists.js.map +1 -1
- package/lib/ReligionManager.js +1 -1
- package/lib/ReligionManager.js.map +1 -1
- package/lib/TimeControlManager.js +2 -2
- package/lib/TimeControlManager.js.map +1 -1
- package/lib/TradeManager.d.ts.map +1 -1
- package/lib/TradeManager.js.map +1 -1
- package/lib/tools/Log.d.ts +1 -1
- package/lib/tools/Log.d.ts.map +1 -1
- package/lib/tools/Log.js +4 -1
- package/lib/tools/Log.js.map +1 -1
- package/lib/ui/BonfireSettingsUi.d.ts +4 -5
- package/lib/ui/BonfireSettingsUi.d.ts.map +1 -1
- package/lib/ui/BonfireSettingsUi.js +109 -90
- package/lib/ui/BonfireSettingsUi.js.map +1 -1
- package/lib/ui/BuildSectionTools.d.ts +3 -13
- package/lib/ui/BuildSectionTools.d.ts.map +1 -1
- package/lib/ui/BuildSectionTools.js +52 -59
- package/lib/ui/BuildSectionTools.js.map +1 -1
- package/lib/ui/BuildingUpgradeSettingsUi.d.ts +2 -4
- package/lib/ui/BuildingUpgradeSettingsUi.d.ts.map +1 -1
- package/lib/ui/BuildingUpgradeSettingsUi.js +13 -20
- package/lib/ui/BuildingUpgradeSettingsUi.js.map +1 -1
- package/lib/ui/EmbassySettingsUi.d.ts +4 -5
- package/lib/ui/EmbassySettingsUi.d.ts.map +1 -1
- package/lib/ui/EmbassySettingsUi.js +48 -61
- package/lib/ui/EmbassySettingsUi.js.map +1 -1
- package/lib/ui/EngineSettingsUi.d.ts +2 -2
- package/lib/ui/EngineSettingsUi.d.ts.map +1 -1
- package/lib/ui/EngineSettingsUi.js +10 -8
- package/lib/ui/EngineSettingsUi.js.map +1 -1
- package/lib/ui/InternalsUi.d.ts +2 -2
- package/lib/ui/InternalsUi.d.ts.map +1 -1
- package/lib/ui/InternalsUi.js +43 -53
- package/lib/ui/InternalsUi.js.map +1 -1
- package/lib/ui/LogFilterSettingsUi.d.ts +2 -4
- package/lib/ui/LogFilterSettingsUi.d.ts.map +1 -1
- package/lib/ui/LogFilterSettingsUi.js +24 -32
- package/lib/ui/LogFilterSettingsUi.js.map +1 -1
- package/lib/ui/MissionSettingsUi.d.ts +2 -4
- package/lib/ui/MissionSettingsUi.d.ts.map +1 -1
- package/lib/ui/MissionSettingsUi.js +13 -18
- package/lib/ui/MissionSettingsUi.js.map +1 -1
- package/lib/ui/PolicySettingsUi.d.ts +2 -4
- package/lib/ui/PolicySettingsUi.d.ts.map +1 -1
- package/lib/ui/PolicySettingsUi.js +13 -20
- package/lib/ui/PolicySettingsUi.js.map +1 -1
- package/lib/ui/ReligionSettingsUi.d.ts +4 -5
- package/lib/ui/ReligionSettingsUi.d.ts.map +1 -1
- package/lib/ui/ReligionSettingsUi.js +108 -132
- package/lib/ui/ReligionSettingsUi.js.map +1 -1
- package/lib/ui/ResetBonfireSettingsUi.d.ts +2 -2
- package/lib/ui/ResetBonfireSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetBonfireSettingsUi.js +30 -36
- package/lib/ui/ResetBonfireSettingsUi.js.map +1 -1
- package/lib/ui/ResetReligionSettingsUi.d.ts +2 -2
- package/lib/ui/ResetReligionSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetReligionSettingsUi.js +42 -51
- package/lib/ui/ResetReligionSettingsUi.js.map +1 -1
- package/lib/ui/ResetResourcesSettingsUi.d.ts +2 -2
- package/lib/ui/ResetResourcesSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetResourcesSettingsUi.js +24 -31
- package/lib/ui/ResetResourcesSettingsUi.js.map +1 -1
- package/lib/ui/ResetSettingsUi.d.ts +2 -4
- package/lib/ui/ResetSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetSettingsUi.js +14 -19
- package/lib/ui/ResetSettingsUi.js.map +1 -1
- package/lib/ui/ResetSpaceSettingsUi.d.ts +2 -2
- package/lib/ui/ResetSpaceSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetSpaceSettingsUi.js +30 -39
- package/lib/ui/ResetSpaceSettingsUi.js.map +1 -1
- package/lib/ui/ResetTimeSettingsUi.d.ts +2 -2
- package/lib/ui/ResetTimeSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetTimeSettingsUi.js +32 -41
- package/lib/ui/ResetTimeSettingsUi.js.map +1 -1
- package/lib/ui/ResetUpgradesSettingsUi.d.ts +2 -2
- package/lib/ui/ResetUpgradesSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetUpgradesSettingsUi.js +12 -12
- package/lib/ui/ResetUpgradesSettingsUi.js.map +1 -1
- package/lib/ui/ResourcesSettingsUi.d.ts +2 -4
- package/lib/ui/ResourcesSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResourcesSettingsUi.js +16 -20
- package/lib/ui/ResourcesSettingsUi.js.map +1 -1
- package/lib/ui/ScienceSettingsUi.d.ts +2 -4
- package/lib/ui/ScienceSettingsUi.d.ts.map +1 -1
- package/lib/ui/ScienceSettingsUi.js +16 -35
- package/lib/ui/ScienceSettingsUi.js.map +1 -1
- package/lib/ui/SpaceSettingsUi.d.ts +4 -5
- package/lib/ui/SpaceSettingsUi.d.ts.map +1 -1
- package/lib/ui/SpaceSettingsUi.js +43 -51
- package/lib/ui/SpaceSettingsUi.js.map +1 -1
- package/lib/ui/StateManagementUi.d.ts +2 -2
- package/lib/ui/StateManagementUi.d.ts.map +1 -1
- package/lib/ui/StateManagementUi.js +162 -169
- package/lib/ui/StateManagementUi.js.map +1 -1
- package/lib/ui/TechSettingsUi.d.ts +4 -5
- package/lib/ui/TechSettingsUi.d.ts.map +1 -1
- package/lib/ui/TechSettingsUi.js +51 -69
- package/lib/ui/TechSettingsUi.js.map +1 -1
- package/lib/ui/TimeControlSettingsUi.d.ts +3 -4
- package/lib/ui/TimeControlSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeControlSettingsUi.js +22 -34
- package/lib/ui/TimeControlSettingsUi.js.map +1 -1
- package/lib/ui/TimeSettingsUi.d.ts +4 -5
- package/lib/ui/TimeSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeSettingsUi.js +55 -62
- package/lib/ui/TimeSettingsUi.js.map +1 -1
- package/lib/ui/TimeSkipHeatSettingsUi.d.ts +4 -5
- package/lib/ui/TimeSkipHeatSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeSkipHeatSettingsUi.js +28 -44
- package/lib/ui/TimeSkipHeatSettingsUi.js.map +1 -1
- package/lib/ui/TimeSkipSettingsUi.d.ts +2 -4
- package/lib/ui/TimeSkipSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeSkipSettingsUi.js +75 -103
- package/lib/ui/TimeSkipSettingsUi.js.map +1 -1
- package/lib/ui/TradeSettingsUi.d.ts +4 -5
- package/lib/ui/TradeSettingsUi.d.ts.map +1 -1
- package/lib/ui/TradeSettingsUi.js +102 -115
- package/lib/ui/TradeSettingsUi.js.map +1 -1
- package/lib/ui/UpgradeSettingsUi.d.ts +4 -5
- package/lib/ui/UpgradeSettingsUi.d.ts.map +1 -1
- package/lib/ui/UpgradeSettingsUi.js +50 -66
- package/lib/ui/UpgradeSettingsUi.js.map +1 -1
- package/lib/ui/UserInterface.d.ts +3 -0
- package/lib/ui/UserInterface.d.ts.map +1 -1
- package/lib/ui/UserInterface.js +37 -19
- package/lib/ui/UserInterface.js.map +1 -1
- package/lib/ui/VillageSettingsUi.d.ts +2 -4
- package/lib/ui/VillageSettingsUi.d.ts.map +1 -1
- package/lib/ui/VillageSettingsUi.js +87 -105
- package/lib/ui/VillageSettingsUi.js.map +1 -1
- package/lib/ui/WorkshopSettingsUi.d.ts +4 -5
- package/lib/ui/WorkshopSettingsUi.d.ts.map +1 -1
- package/lib/ui/WorkshopSettingsUi.js +82 -103
- package/lib/ui/WorkshopSettingsUi.js.map +1 -1
- package/lib/ui/components/Button.d.ts +9 -8
- package/lib/ui/components/Button.d.ts.map +1 -1
- package/lib/ui/components/Button.js +8 -6
- package/lib/ui/components/Button.js.map +1 -1
- package/lib/ui/components/ButtonListItem.d.ts +4 -4
- package/lib/ui/components/ButtonListItem.d.ts.map +1 -1
- package/lib/ui/components/ButtonListItem.js +2 -7
- package/lib/ui/components/ButtonListItem.js.map +1 -1
- package/lib/ui/components/CollapsiblePanel.d.ts +15 -11
- package/lib/ui/components/CollapsiblePanel.d.ts.map +1 -1
- package/lib/ui/components/CollapsiblePanel.js +42 -25
- package/lib/ui/components/CollapsiblePanel.js.map +1 -1
- package/lib/ui/components/Container.d.ts +7 -2
- package/lib/ui/components/Container.d.ts.map +1 -1
- package/lib/ui/components/Container.js +6 -3
- package/lib/ui/components/Container.js.map +1 -1
- package/lib/ui/components/CyclesList.d.ts +7 -8
- package/lib/ui/components/CyclesList.d.ts.map +1 -1
- package/lib/ui/components/CyclesList.js +34 -27
- package/lib/ui/components/CyclesList.js.map +1 -1
- package/lib/ui/components/Delimiter.d.ts +3 -2
- package/lib/ui/components/Delimiter.d.ts.map +1 -1
- package/lib/ui/components/Delimiter.js +6 -2
- package/lib/ui/components/Delimiter.js.map +1 -1
- package/lib/ui/components/Dialog.d.ts +14 -6
- package/lib/ui/components/Dialog.d.ts.map +1 -1
- package/lib/ui/components/Dialog.js +66 -40
- package/lib/ui/components/Dialog.js.map +1 -1
- package/lib/ui/components/ExplainerListItem.d.ts +5 -2
- package/lib/ui/components/ExplainerListItem.d.ts.map +1 -1
- package/lib/ui/components/ExplainerListItem.js +7 -4
- package/lib/ui/components/ExplainerListItem.js.map +1 -1
- package/lib/ui/components/Fieldset.d.ts +6 -4
- package/lib/ui/components/Fieldset.d.ts.map +1 -1
- package/lib/ui/components/Fieldset.js +6 -3
- package/lib/ui/components/Fieldset.js.map +1 -1
- package/lib/ui/components/HeaderListItem.d.ts +6 -3
- package/lib/ui/components/HeaderListItem.d.ts.map +1 -1
- package/lib/ui/components/HeaderListItem.js +6 -3
- package/lib/ui/components/HeaderListItem.js.map +1 -1
- package/lib/ui/components/IconButton.d.ts +8 -6
- package/lib/ui/components/IconButton.d.ts.map +1 -1
- package/lib/ui/components/IconButton.js +6 -5
- package/lib/ui/components/IconButton.js.map +1 -1
- package/lib/ui/components/IconSettingsPanel.d.ts +5 -4
- package/lib/ui/components/IconSettingsPanel.d.ts.map +1 -1
- package/lib/ui/components/IconSettingsPanel.js +4 -2
- package/lib/ui/components/IconSettingsPanel.js.map +1 -1
- package/lib/ui/components/Input.d.ts +6 -3
- package/lib/ui/components/Input.d.ts.map +1 -1
- package/lib/ui/components/Input.js +6 -3
- package/lib/ui/components/Input.js.map +1 -1
- package/lib/ui/components/LabelListItem.d.ts +10 -7
- package/lib/ui/components/LabelListItem.d.ts.map +1 -1
- package/lib/ui/components/LabelListItem.js +21 -10
- package/lib/ui/components/LabelListItem.js.map +1 -1
- package/lib/ui/components/ListItem.d.ts +9 -6
- package/lib/ui/components/ListItem.d.ts.map +1 -1
- package/lib/ui/components/ListItem.js +6 -3
- package/lib/ui/components/ListItem.js.map +1 -1
- package/lib/ui/components/OptionsListItem.d.ts +6 -5
- package/lib/ui/components/OptionsListItem.d.ts.map +1 -1
- package/lib/ui/components/OptionsListItem.js +7 -5
- package/lib/ui/components/OptionsListItem.js.map +1 -1
- package/lib/ui/components/Paragraph.d.ts +7 -2
- package/lib/ui/components/Paragraph.d.ts.map +1 -1
- package/lib/ui/components/Paragraph.js +6 -3
- package/lib/ui/components/Paragraph.js.map +1 -1
- package/lib/ui/components/RadioItem.d.ts +9 -7
- package/lib/ui/components/RadioItem.d.ts.map +1 -1
- package/lib/ui/components/RadioItem.js +9 -7
- package/lib/ui/components/RadioItem.js.map +1 -1
- package/lib/ui/components/SeasonsList.d.ts +7 -6
- package/lib/ui/components/SeasonsList.d.ts.map +1 -1
- package/lib/ui/components/SeasonsList.js +20 -13
- package/lib/ui/components/SeasonsList.js.map +1 -1
- package/lib/ui/components/SettingLimitedListItem.d.ts +7 -7
- package/lib/ui/components/SettingLimitedListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingLimitedListItem.js +7 -8
- package/lib/ui/components/SettingLimitedListItem.js.map +1 -1
- package/lib/ui/components/SettingLimitedTriggerListItem.d.ts +7 -6
- package/lib/ui/components/SettingLimitedTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingLimitedTriggerListItem.js +12 -11
- package/lib/ui/components/SettingLimitedTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingListItem.d.ts +11 -11
- package/lib/ui/components/SettingListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingListItem.js +16 -20
- package/lib/ui/components/SettingListItem.js.map +1 -1
- package/lib/ui/components/SettingMaxListItem.d.ts +7 -7
- package/lib/ui/components/SettingMaxListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingMaxListItem.js +12 -10
- package/lib/ui/components/SettingMaxListItem.js.map +1 -1
- package/lib/ui/components/SettingMaxTriggerListItem.d.ts +9 -6
- package/lib/ui/components/SettingMaxTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingMaxTriggerListItem.js +19 -14
- package/lib/ui/components/SettingMaxTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingTriggerListItem.d.ts +8 -7
- package/lib/ui/components/SettingTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingTriggerListItem.js +15 -12
- package/lib/ui/components/SettingTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingsList.d.ts +13 -11
- package/lib/ui/components/SettingsList.d.ts.map +1 -1
- package/lib/ui/components/SettingsList.js +15 -16
- package/lib/ui/components/SettingsList.js.map +1 -1
- package/lib/ui/components/SettingsPanel.d.ts +9 -8
- package/lib/ui/components/SettingsPanel.d.ts.map +1 -1
- package/lib/ui/components/SettingsPanel.js +10 -10
- package/lib/ui/components/SettingsPanel.js.map +1 -1
- package/lib/ui/components/TextButton.d.ts +7 -6
- package/lib/ui/components/TextButton.d.ts.map +1 -1
- package/lib/ui/components/TextButton.js +7 -5
- package/lib/ui/components/TextButton.js.map +1 -1
- package/lib/ui/components/ToolbarListItem.d.ts +6 -5
- package/lib/ui/components/ToolbarListItem.d.ts.map +1 -1
- package/lib/ui/components/ToolbarListItem.js +7 -12
- package/lib/ui/components/ToolbarListItem.js.map +1 -1
- package/lib/ui/components/UiComponent.d.ts +32 -18
- package/lib/ui/components/UiComponent.d.ts.map +1 -1
- package/lib/ui/components/UiComponent.js +50 -19
- package/lib/ui/components/UiComponent.js.map +1 -1
- package/lib/ui/components/WorkshopCraftListItem.d.ts +8 -7
- package/lib/ui/components/WorkshopCraftListItem.d.ts.map +1 -1
- package/lib/ui/components/WorkshopCraftListItem.js +17 -18
- package/lib/ui/components/WorkshopCraftListItem.js.map +1 -1
- package/lib/ui/components/buttons/ConsumeButton.d.ts +5 -2
- package/lib/ui/components/buttons/ConsumeButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/ConsumeButton.js +19 -26
- package/lib/ui/components/buttons/ConsumeButton.js.map +1 -1
- package/lib/ui/components/buttons/ExpandoButton.d.ts +6 -2
- package/lib/ui/components/buttons/ExpandoButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/ExpandoButton.js +10 -9
- package/lib/ui/components/buttons/ExpandoButton.js.map +1 -1
- package/lib/ui/components/buttons/LimitedButton.d.ts +8 -7
- package/lib/ui/components/buttons/LimitedButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/LimitedButton.js +20 -13
- package/lib/ui/components/buttons/LimitedButton.js.map +1 -1
- package/lib/ui/components/buttons/MaxButton.d.ts +5 -5
- package/lib/ui/components/buttons/MaxButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/MaxButton.js +5 -7
- package/lib/ui/components/buttons/MaxButton.js.map +1 -1
- package/lib/ui/components/buttons/PaddingButton.d.ts +5 -2
- package/lib/ui/components/buttons/PaddingButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/PaddingButton.js +6 -3
- package/lib/ui/components/buttons/PaddingButton.js.map +1 -1
- package/lib/ui/components/buttons/StockButton.d.ts +5 -2
- package/lib/ui/components/buttons/StockButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/StockButton.js +25 -32
- package/lib/ui/components/buttons/StockButton.js.map +1 -1
- package/lib/ui/components/buttons/TriggerButton.d.ts +6 -5
- package/lib/ui/components/buttons/TriggerButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/TriggerButton.js +11 -12
- package/lib/ui/components/buttons/TriggerButton.js.map +1 -1
- package/lib/ui/components/buttons-text/BuyButton.d.ts +6 -5
- package/lib/ui/components/buttons-text/BuyButton.d.ts.map +1 -1
- package/lib/ui/components/buttons-text/BuyButton.js +19 -26
- package/lib/ui/components/buttons-text/BuyButton.js.map +1 -1
- package/lib/ui/components/buttons-text/SellButton.d.ts +6 -5
- package/lib/ui/components/buttons-text/SellButton.d.ts.map +1 -1
- package/lib/ui/components/buttons-text/SellButton.js +19 -28
- package/lib/ui/components/buttons-text/SellButton.js.map +1 -1
- package/output/kitten-scientists.inject.js +2441 -2516
- package/package.json +6 -6
|
@@ -15,14 +15,14 @@ export class OptionsListItem extends UiComponent {
|
|
|
15
15
|
* @param setting The setting this element is linked to.
|
|
16
16
|
* @param options Options for the list item.
|
|
17
17
|
*/
|
|
18
|
-
constructor(
|
|
19
|
-
super(
|
|
18
|
+
constructor(parent, label, setting, options) {
|
|
19
|
+
super(parent, { ...options });
|
|
20
20
|
this.element = $("<li/>");
|
|
21
|
-
this.fieldset = new Fieldset(
|
|
21
|
+
this.fieldset = new Fieldset(parent, label);
|
|
22
22
|
this.addChild(this.fieldset);
|
|
23
23
|
this._items = new Array();
|
|
24
24
|
for (const option of setting.options) {
|
|
25
|
-
this._items.push(new RadioItem(
|
|
25
|
+
this._items.push(new RadioItem(parent, setting, option, label, {
|
|
26
26
|
onCheck: options?.onCheck,
|
|
27
27
|
readOnly: options?.readOnly,
|
|
28
28
|
}));
|
|
@@ -30,8 +30,10 @@ export class OptionsListItem extends UiComponent {
|
|
|
30
30
|
this.fieldset.addChildren(this._items);
|
|
31
31
|
this.setting = setting;
|
|
32
32
|
}
|
|
33
|
+
toString() {
|
|
34
|
+
return `[${OptionsListItem.name}#${this.componentId}]`;
|
|
35
|
+
}
|
|
33
36
|
refreshUi() {
|
|
34
|
-
super.refreshUi();
|
|
35
37
|
for (const option of this._items) {
|
|
36
38
|
if (option.option.value === this.setting.selected) {
|
|
37
39
|
option.input.prop("checked", true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionsListItem.js","sourceRoot":"","sources":["../../../source/ui/components/OptionsListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OptionsListItem.js","sourceRoot":"","sources":["../../../source/ui/components/OptionsListItem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AAQxE,MAAM,OAAO,eAAkE,SAAQ,WAAW;IAEvF,QAAQ,CAAW;IACnB,OAAO,CAAW;IAClB,OAAO,CAAS;IAChB,MAAM,CAAmB;IAElC;;;;;;;;OAQG;IACH,YACE,MAAmB,EACnB,KAAa,EACb,OAAiB,EACjB,OAAgC;QAEhC,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;QAE1B,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE7B,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,EAAa,CAAC;QACrC,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACrC,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,IAAI,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;gBAC5C,OAAO,EAAE,OAAO,EAAE,OAAO;gBACzB,QAAQ,EAAE,OAAO,EAAE,QAAQ;aAC5B,CAAC,CACH,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,eAAe,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IACzD,CAAC;IAED,SAAS;QACP,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACjC,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;gBAClD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;gBACnC,MAAM;YACR,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
2
|
+
export type ParagraphOptions = ThisType<Paragraph> & UiComponentOptions & {
|
|
3
|
+
readonly classes?: Array<string>;
|
|
4
|
+
};
|
|
3
5
|
export declare class Paragraph extends UiComponent {
|
|
6
|
+
readonly options: ParagraphOptions;
|
|
4
7
|
readonly element: JQuery<HTMLParagraphElement>;
|
|
5
8
|
/**
|
|
6
9
|
* Constructs a paragraph.
|
|
@@ -9,6 +12,8 @@ export declare class Paragraph extends UiComponent {
|
|
|
9
12
|
* @param text - The text inside the paragraph.
|
|
10
13
|
* @param options - Options for the UI element.
|
|
11
14
|
*/
|
|
12
|
-
constructor(
|
|
15
|
+
constructor(parent: UiComponent, text: string, options?: ParagraphOptions);
|
|
16
|
+
toString(): string;
|
|
17
|
+
refreshUi(): void;
|
|
13
18
|
}
|
|
14
19
|
//# sourceMappingURL=Paragraph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paragraph.d.ts","sourceRoot":"","sources":["../../../source/ui/components/Paragraph.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Paragraph.d.ts","sourceRoot":"","sources":["../../../source/ui/components/Paragraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,SAAS,CAAC,GAChD,kBAAkB,GAAG;IACnB,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAClC,CAAC;AAEJ,qBAAa,SAAU,SAAQ,WAAW;IACxC,SAAiB,OAAO,EAAE,gBAAgB,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAE/C;;;;;;OAMG;gBACS,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB;IAUzE,QAAQ,IAAI,MAAM;IAIlB,SAAS,IAAI,IAAI;CAClB"}
|
|
@@ -8,13 +8,16 @@ export class Paragraph extends UiComponent {
|
|
|
8
8
|
* @param text - The text inside the paragraph.
|
|
9
9
|
* @param options - Options for the UI element.
|
|
10
10
|
*/
|
|
11
|
-
constructor(
|
|
12
|
-
super(
|
|
11
|
+
constructor(parent, text, options) {
|
|
12
|
+
super(parent, { ...options });
|
|
13
13
|
this.element = $("<p/>").text(text);
|
|
14
14
|
for (const className of options?.classes ?? []) {
|
|
15
15
|
this.element.addClass(className);
|
|
16
16
|
}
|
|
17
|
-
this.addChildren(options?.children);
|
|
18
17
|
}
|
|
18
|
+
toString() {
|
|
19
|
+
return `[${Paragraph.name}#${this.componentId}]`;
|
|
20
|
+
}
|
|
21
|
+
refreshUi() { }
|
|
19
22
|
}
|
|
20
23
|
//# sourceMappingURL=Paragraph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paragraph.js","sourceRoot":"","sources":["../../../source/ui/components/Paragraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Paragraph.js","sourceRoot":"","sources":["../../../source/ui/components/Paragraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AAOxE,MAAM,OAAO,SAAU,SAAQ,WAAW;IAE/B,OAAO,CAA+B;IAE/C;;;;;;OAMG;IACH,YAAY,MAAmB,EAAE,IAAY,EAAE,OAA0B;QACvE,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAuB,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE1D,KAAK,MAAM,SAAS,IAAI,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC;YAC/C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,SAAS,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IACnD,CAAC;IAED,SAAS,KAAU,CAAC;CACrB"}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import type { SettingOptions } from "../../settings/Settings.js";
|
|
3
2
|
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
4
|
-
export type RadioItemOptions = UiComponentOptions & {
|
|
3
|
+
export type RadioItemOptions = ThisType<RadioItem> & UiComponentOptions & {
|
|
5
4
|
/**
|
|
6
5
|
* Will be invoked when the user selects this radio item.
|
|
7
6
|
*/
|
|
8
|
-
onCheck
|
|
7
|
+
onCheck?: (isBatchProcess?: boolean) => void;
|
|
9
8
|
/**
|
|
10
9
|
* Should there be additional padding below this element?
|
|
11
10
|
*/
|
|
12
|
-
delimiter
|
|
11
|
+
delimiter?: boolean;
|
|
13
12
|
/**
|
|
14
13
|
* Should an indicator be rendered in front of the element,
|
|
15
14
|
* to indicate that this is an upgrade of a prior setting?
|
|
16
15
|
*/
|
|
17
|
-
upgradeIndicator
|
|
16
|
+
upgradeIndicator?: boolean;
|
|
18
17
|
/**
|
|
19
18
|
* Should the user be prevented from changing the value of the input?
|
|
20
19
|
*/
|
|
21
|
-
readOnly
|
|
20
|
+
readOnly?: boolean;
|
|
22
21
|
};
|
|
23
22
|
export declare class RadioItem<TSetting extends SettingOptions = SettingOptions> extends UiComponent {
|
|
23
|
+
readonly options: RadioItemOptions;
|
|
24
24
|
readonly setting: TSetting;
|
|
25
25
|
readonly option: TSetting["options"][0];
|
|
26
26
|
readonly element: JQuery;
|
|
27
|
+
readonly elementLabel: JQuery<HTMLLabelElement>;
|
|
27
28
|
readonly input: JQuery;
|
|
28
29
|
readOnly: boolean;
|
|
29
30
|
/**
|
|
@@ -36,7 +37,8 @@ export declare class RadioItem<TSetting extends SettingOptions = SettingOptions>
|
|
|
36
37
|
* @param groupKey A unique name for the group of radio items this one belongs to.
|
|
37
38
|
* @param options Options for this radio item.
|
|
38
39
|
*/
|
|
39
|
-
constructor(
|
|
40
|
+
constructor(parent: UiComponent, setting: TSetting, option: TSetting["options"][0], groupKey: string, options?: RadioItemOptions);
|
|
41
|
+
toString(): string;
|
|
40
42
|
refreshUi(): void;
|
|
41
43
|
}
|
|
42
44
|
//# sourceMappingURL=RadioItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/RadioItem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"RadioItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/RadioItem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,SAAS,CAAC,GAChD,kBAAkB,GAAG;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAE7C;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEJ,qBAAa,SAAS,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,CAAE,SAAQ,WAAW;IAC1F,SAAiB,OAAO,EAAE,gBAAgB,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;;;;;;OASG;gBAED,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAC9B,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,gBAAgB;IAsC5B,QAAQ,IAAI,MAAM;IAIlB,SAAS,IAAI,IAAI;CAGlB"}
|
|
@@ -7,6 +7,7 @@ export class RadioItem extends UiComponent {
|
|
|
7
7
|
setting;
|
|
8
8
|
option;
|
|
9
9
|
element;
|
|
10
|
+
elementLabel;
|
|
10
11
|
input;
|
|
11
12
|
readOnly;
|
|
12
13
|
/**
|
|
@@ -19,14 +20,14 @@ export class RadioItem extends UiComponent {
|
|
|
19
20
|
* @param groupKey A unique name for the group of radio items this one belongs to.
|
|
20
21
|
* @param options Options for this radio item.
|
|
21
22
|
*/
|
|
22
|
-
constructor(
|
|
23
|
-
super(
|
|
23
|
+
constructor(parent, setting, option, groupKey, options) {
|
|
24
|
+
super(parent, { ...options });
|
|
24
25
|
const element = $("<div/>");
|
|
25
26
|
element.addClass(stylesSettingListItem.setting);
|
|
26
27
|
if (options?.delimiter === true) {
|
|
27
28
|
element.addClass(stylesDelimiter.delimiter);
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
+
this.elementLabel = $("<label/>", {
|
|
30
31
|
text: `${options?.upgradeIndicator ? "⮤ " : ""}${option.label}`,
|
|
31
32
|
}).addClass(stylesLabel.label);
|
|
32
33
|
const input = $("<input/>", {
|
|
@@ -40,16 +41,17 @@ export class RadioItem extends UiComponent {
|
|
|
40
41
|
options.onCheck();
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
|
-
elementLabel.prepend(input);
|
|
44
|
-
element.append(elementLabel);
|
|
44
|
+
this.elementLabel.prepend(input);
|
|
45
|
+
element.append(this.elementLabel);
|
|
45
46
|
this.input = input;
|
|
46
47
|
this.element = element;
|
|
47
|
-
this.addChildren(options?.children);
|
|
48
48
|
this.setting = setting;
|
|
49
49
|
this.option = option;
|
|
50
50
|
}
|
|
51
|
+
toString() {
|
|
52
|
+
return `[${RadioItem.name}#${this.componentId}]: '${this.elementLabel.text()}'`;
|
|
53
|
+
}
|
|
51
54
|
refreshUi() {
|
|
52
|
-
super.refreshUi();
|
|
53
55
|
this.input.prop("disabled", this.readOnly);
|
|
54
56
|
}
|
|
55
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioItem.js","sourceRoot":"","sources":["../../../source/ui/components/RadioItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioItem.js","sourceRoot":"","sources":["../../../source/ui/components/RadioItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAE7D,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,qBAAqB,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AA0BxE,MAAM,OAAO,SAA4D,SAAQ,WAAW;IAEjF,OAAO,CAAW;IAClB,MAAM,CAAyB;IAC/B,OAAO,CAAS;IAChB,YAAY,CAA2B;IACvC,KAAK,CAAS;IAEvB,QAAQ,CAAU;IAElB;;;;;;;;;OASG;IACH,YACE,MAAmB,EACnB,OAAiB,EACjB,MAA8B,EAC9B,QAAgB,EAChB,OAA0B;QAE1B,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,MAAM,OAAO,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC5B,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAEhD,IAAI,OAAO,EAAE,SAAS,KAAK,IAAI,EAAE,CAAC;YAChC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAC9C,CAAC;QAED,IAAI,CAAC,YAAY,GAAG,CAAC,CAAmB,UAAU,EAAE;YAClD,IAAI,EAAE,GAAG,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE;SAChE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAE/B,MAAM,KAAK,GAAG,CAAC,CAAC,UAAU,EAAE;YAC1B,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAExB,IAAI,CAAC,QAAQ,GAAG,OAAO,EAAE,QAAQ,IAAI,KAAK,CAAC;QAE3C,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;YACtB,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;YACrC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC;gBAC7B,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACjC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAElC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,SAAS,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;IAClF,CAAC;IAED,SAAS;QACP,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import type { Setting } from "../../settings/Settings.js";
|
|
3
2
|
import type { Season } from "../../types/index.js";
|
|
4
3
|
import { SettingListItem } from "./SettingListItem.js";
|
|
5
4
|
import { SettingsList, type SettingsListOptions } from "./SettingsList.js";
|
|
5
|
+
import type { UiComponent } from "./UiComponent.js";
|
|
6
6
|
export type SettingWithSeasons = Record<Season, Setting>;
|
|
7
|
-
export type SeasonsListOptions =
|
|
7
|
+
export type SeasonsListOptions = ThisType<SeasonsList> & SettingsListOptions & {
|
|
8
8
|
/**
|
|
9
9
|
* Called when a season is checked.
|
|
10
10
|
*
|
|
11
11
|
* @param label The label on the season element.
|
|
12
12
|
* @param setting The setting associated with the season.
|
|
13
13
|
*/
|
|
14
|
-
readonly
|
|
14
|
+
readonly onCheckSeason?: (label: string, setting: Setting, isBatchProcess?: boolean) => void;
|
|
15
15
|
/**
|
|
16
16
|
* Called when a season is unchecked.
|
|
17
17
|
*
|
|
18
18
|
* @param label The label on the season element.
|
|
19
19
|
* @param setting The setting associated with the season.
|
|
20
20
|
*/
|
|
21
|
-
readonly
|
|
21
|
+
readonly onUnCheckSeason?: (label: string, setting: Setting, isBatchProcess?: boolean) => void;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
24
|
* A list of 4 settings correlating to the 4 seasons.
|
|
25
25
|
*/
|
|
26
26
|
export declare class SeasonsList extends SettingsList {
|
|
27
|
+
readonly options: SeasonsListOptions;
|
|
27
28
|
readonly setting: SettingWithSeasons;
|
|
28
29
|
readonly spring: SettingListItem;
|
|
29
30
|
readonly summer: SettingListItem;
|
|
@@ -36,7 +37,7 @@ export declare class SeasonsList extends SettingsList {
|
|
|
36
37
|
* @param setting The settings that correlate to this list.
|
|
37
38
|
* @param options Options for this list
|
|
38
39
|
*/
|
|
39
|
-
constructor(
|
|
40
|
-
|
|
40
|
+
constructor(parent: UiComponent, setting: SettingWithSeasons, options?: SeasonsListOptions);
|
|
41
|
+
toString(): string;
|
|
41
42
|
}
|
|
42
43
|
//# sourceMappingURL=SeasonsList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeasonsList.d.ts","sourceRoot":"","sources":["../../../source/ui/components/SeasonsList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"SeasonsList.d.ts","sourceRoot":"","sources":["../../../source/ui/components/SeasonsList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEzD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,WAAW,CAAC,GACpD,mBAAmB,GAAG;IACpB;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAE7F;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAChG,CAAC;AAEJ;;GAEG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAC3C,SAAiB,OAAO,EAAE,kBAAkB,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IAErC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IAEjC;;;;;;OAMG;gBACS,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,kBAAkB;IAsC1F,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -16,34 +16,41 @@ export class SeasonsList extends SettingsList {
|
|
|
16
16
|
* @param setting The settings that correlate to this list.
|
|
17
17
|
* @param options Options for this list
|
|
18
18
|
*/
|
|
19
|
-
constructor(
|
|
20
|
-
super(
|
|
19
|
+
constructor(parent, setting, options) {
|
|
20
|
+
super(parent, options);
|
|
21
21
|
this.setting = setting;
|
|
22
22
|
this.addEventListener("enableAll", () => {
|
|
23
23
|
this.autumn.check(true);
|
|
24
24
|
this.spring.check(true);
|
|
25
25
|
this.summer.check(true);
|
|
26
26
|
this.winter.check(true);
|
|
27
|
-
this.refreshUi();
|
|
28
27
|
});
|
|
29
28
|
this.addEventListener("disableAll", () => {
|
|
30
29
|
this.autumn.uncheck(true);
|
|
31
30
|
this.spring.uncheck(true);
|
|
32
31
|
this.summer.uncheck(true);
|
|
33
32
|
this.winter.uncheck(true);
|
|
34
|
-
this.refreshUi();
|
|
35
33
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
const makeSeason = (label, setting) => {
|
|
35
|
+
return new SettingListItem(parent, setting, label, {
|
|
36
|
+
onCheck: (isBatchProcess) => {
|
|
37
|
+
options?.onCheckSeason?.(label, setting, isBatchProcess);
|
|
38
|
+
this.requestRefresh();
|
|
39
|
+
},
|
|
40
|
+
onUnCheck: (isBatchProcess) => {
|
|
41
|
+
options?.onUnCheckSeason?.(label, setting, isBatchProcess);
|
|
42
|
+
this.requestRefresh();
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
this.spring = makeSeason(this.host.engine.i18n("$calendar.season.spring"), this.setting.spring);
|
|
47
|
+
this.summer = makeSeason(this.host.engine.i18n("$calendar.season.summer"), this.setting.summer);
|
|
48
|
+
this.autumn = makeSeason(this.host.engine.i18n("$calendar.season.autumn"), this.setting.autumn);
|
|
49
|
+
this.winter = makeSeason(this.host.engine.i18n("$calendar.season.winter"), this.setting.winter);
|
|
40
50
|
this.addChildren([this.spring, this.summer, this.autumn, this.winter]);
|
|
41
51
|
}
|
|
42
|
-
|
|
43
|
-
return
|
|
44
|
-
onCheck: (isBatchProcess) => handler?.onCheck?.(label, setting, isBatchProcess),
|
|
45
|
-
onUnCheck: (isBatchProcess) => handler?.onUnCheck?.(label, setting, isBatchProcess),
|
|
46
|
-
});
|
|
52
|
+
toString() {
|
|
53
|
+
return `[${SeasonsList.name}#${this.componentId}]`;
|
|
47
54
|
}
|
|
48
55
|
}
|
|
49
56
|
//# sourceMappingURL=SeasonsList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeasonsList.js","sourceRoot":"","sources":["../../../source/ui/components/SeasonsList.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SeasonsList.js","sourceRoot":"","sources":["../../../source/ui/components/SeasonsList.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import type { SettingLimited } from "../../settings/Settings.js";
|
|
3
2
|
import { SettingListItem, type SettingListItemOptions } from "./SettingListItem.js";
|
|
4
3
|
import type { UiComponent } from "./UiComponent.js";
|
|
5
4
|
import { LimitedButton } from "./buttons/LimitedButton.js";
|
|
6
|
-
export type
|
|
5
|
+
export type SettingLimitedListItemOptions = ThisType<SettingLimitedListItem> & SettingListItemOptions & {
|
|
7
6
|
/**
|
|
8
7
|
* Is called when the "Limited" checkbox is checked.
|
|
9
8
|
*/
|
|
10
|
-
readonly onLimitedCheck
|
|
9
|
+
readonly onLimitedCheck?: () => void;
|
|
11
10
|
/**
|
|
12
11
|
* Is called when the "Limited" checkbox is unchecked.
|
|
13
12
|
*/
|
|
14
|
-
readonly onLimitedUnCheck
|
|
13
|
+
readonly onLimitedUnCheck?: () => void;
|
|
15
14
|
};
|
|
16
|
-
export declare class SettingLimitedListItem
|
|
15
|
+
export declare class SettingLimitedListItem extends SettingListItem {
|
|
16
|
+
readonly options: SettingLimitedListItemOptions;
|
|
17
17
|
readonly limitedButton: LimitedButton;
|
|
18
18
|
/**
|
|
19
19
|
* Create a UI element for a setting that can be limited.
|
|
@@ -24,7 +24,7 @@ export declare class SettingLimitedListItem<TOptions extends SettingListItemOpti
|
|
|
24
24
|
* @param setting The setting model.
|
|
25
25
|
* @param options Options for the list item.
|
|
26
26
|
*/
|
|
27
|
-
constructor(
|
|
28
|
-
|
|
27
|
+
constructor(parent: UiComponent, setting: SettingLimited, label: string, options: SettingLimitedListItemOptions);
|
|
28
|
+
toString(): string;
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=SettingLimitedListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingLimitedListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/SettingLimitedListItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"SettingLimitedListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/SettingLimitedListItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC,sBAAsB,CAAC,GAC1E,sBAAsB,GAAG;IACvB;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CACxC,CAAC;AAEJ,qBAAa,sBAAuB,SAAQ,eAAe;IACzD,SAAiB,OAAO,EAAE,6BAA6B,CAAC;IACxD,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEtC;;;;;;;;OAQG;gBAED,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,6BAA6B;IAaxC,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -13,19 +13,18 @@ export class SettingLimitedListItem extends SettingListItem {
|
|
|
13
13
|
* @param setting The setting model.
|
|
14
14
|
* @param options Options for the list item.
|
|
15
15
|
*/
|
|
16
|
-
constructor(
|
|
17
|
-
super(
|
|
18
|
-
this.limitedButton = new LimitedButton(
|
|
16
|
+
constructor(parent, setting, label, options) {
|
|
17
|
+
super(parent, setting, label, options);
|
|
18
|
+
this.limitedButton = new LimitedButton(parent, setting, {
|
|
19
19
|
...options,
|
|
20
20
|
});
|
|
21
|
-
this.
|
|
22
|
-
new Container(
|
|
21
|
+
this.addChildrenHead([
|
|
22
|
+
new Container(parent, { classes: [stylesLabelListItem.fillSpace] }),
|
|
23
23
|
this.limitedButton,
|
|
24
24
|
]);
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.limitedButton.refreshUi();
|
|
26
|
+
toString() {
|
|
27
|
+
return `[${SettingLimitedListItem.name}#${this.componentId}]: '${this.elementLabel.text()}'`;
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
//# sourceMappingURL=SettingLimitedListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingLimitedListItem.js","sourceRoot":"","sources":["../../../source/ui/components/SettingLimitedListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SettingLimitedListItem.js","sourceRoot":"","sources":["../../../source/ui/components/SettingLimitedListItem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,mBAAmB,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAA+B,MAAM,sBAAsB,CAAC;AAEpF,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAe3D,MAAM,OAAO,sBAAuB,SAAQ,eAAe;IAEhD,aAAa,CAAgB;IAEtC;;;;;;;;OAQG;IACH,YACE,MAAmB,EACnB,OAAuB,EACvB,KAAa,EACb,OAAsC;QAEtC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAEvC,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE;YACtD,GAAG,OAAO;SACX,CAAC,CAAC;QACH,IAAI,CAAC,eAAe,CAAC;YACnB,IAAI,SAAS,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,mBAAmB,CAAC,SAAS,CAAC,EAAE,CAAC;YACnE,IAAI,CAAC,aAAa;SACnB,CAAC,CAAC;IACL,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,sBAAsB,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;IAC/F,CAAC;CACF"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { SupportedLocale } from "../../Engine.js";
|
|
2
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
3
2
|
import type { SettingLimitedTrigger, SettingOptions } from "../../settings/Settings.js";
|
|
4
|
-
import { SettingLimitedListItem, type
|
|
3
|
+
import { SettingLimitedListItem, type SettingLimitedListItemOptions } from "./SettingLimitedListItem.js";
|
|
5
4
|
import type { SettingListItemOptions } from "./SettingListItem.js";
|
|
6
|
-
import type {
|
|
5
|
+
import type { SettingTriggerListItemOptions } from "./SettingTriggerListItem.js";
|
|
7
6
|
import type { UiComponent } from "./UiComponent.js";
|
|
8
7
|
import { TriggerButton } from "./buttons/TriggerButton.js";
|
|
9
|
-
export
|
|
8
|
+
export type SettingLimitedTriggerListItemOptions = SettingListItemOptions & SettingLimitedListItemOptions & SettingTriggerListItemOptions & ThisType<SettingLimitedTriggerListItem>;
|
|
9
|
+
export declare class SettingLimitedTriggerListItem extends SettingLimitedListItem {
|
|
10
|
+
readonly options: SettingLimitedTriggerListItemOptions;
|
|
10
11
|
readonly triggerButton: TriggerButton;
|
|
11
|
-
constructor(
|
|
12
|
-
|
|
12
|
+
constructor(parent: UiComponent, setting: SettingLimitedTrigger, locale: SettingOptions<SupportedLocale>, label: string, options: SettingLimitedTriggerListItemOptions);
|
|
13
|
+
toString(): string;
|
|
13
14
|
}
|
|
14
15
|
//# sourceMappingURL=SettingLimitedTriggerListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingLimitedTriggerListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/SettingLimitedTriggerListItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"SettingLimitedTriggerListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/SettingLimitedTriggerListItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,EACnC,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,MAAM,oCAAoC,GAAG,sBAAsB,GACvE,6BAA6B,GAC7B,6BAA6B,GAC7B,QAAQ,CAAC,6BAA6B,CAAC,CAAC;AAE1C,qBAAa,6BAA8B,SAAQ,sBAAsB;IACvE,SAAiB,OAAO,EAAE,oCAAoC,CAAC;IAC/D,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;gBAGpC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,cAAc,CAAC,eAAe,CAAC,EACvC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,oCAAoC;IAgB/C,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -2,20 +2,21 @@ import { SettingLimitedListItem, } from "./SettingLimitedListItem.js";
|
|
|
2
2
|
import { TriggerButton } from "./buttons/TriggerButton.js";
|
|
3
3
|
export class SettingLimitedTriggerListItem extends SettingLimitedListItem {
|
|
4
4
|
triggerButton;
|
|
5
|
-
constructor(
|
|
6
|
-
super(
|
|
7
|
-
this.triggerButton = new TriggerButton(
|
|
5
|
+
constructor(parent, setting, locale, label, options) {
|
|
6
|
+
super(parent, setting, label, options);
|
|
7
|
+
this.triggerButton = new TriggerButton(parent, setting, locale, {
|
|
8
8
|
border: false,
|
|
9
|
-
onClick:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
onClick: async () => {
|
|
10
|
+
await options.onSetTrigger.call(this);
|
|
11
|
+
this.requestRefresh();
|
|
12
|
+
},
|
|
13
|
+
onRefresh: options?.onRefreshTrigger ? () => options.onRefreshTrigger?.call(this) : undefined,
|
|
14
|
+
renderLabel: options?.renderLabelTrigger ?? true,
|
|
13
15
|
});
|
|
14
|
-
this.
|
|
16
|
+
this.addChildHead(this.triggerButton);
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
this.triggerButton.refreshUi();
|
|
18
|
+
toString() {
|
|
19
|
+
return `[${SettingLimitedTriggerListItem.name}#${this.componentId}]: '${this.elementLabel.text()}'`;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
//# sourceMappingURL=SettingLimitedTriggerListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingLimitedTriggerListItem.js","sourceRoot":"","sources":["../../../source/ui/components/SettingLimitedTriggerListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SettingLimitedTriggerListItem.js","sourceRoot":"","sources":["../../../source/ui/components/SettingLimitedTriggerListItem.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,GAEvB,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAO3D,MAAM,OAAO,6BAA8B,SAAQ,sBAAsB;IAE9D,aAAa,CAAgB;IAEtC,YACE,MAAmB,EACnB,OAA8B,EAC9B,MAAuC,EACvC,KAAa,EACb,OAA6C;QAE7C,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAEvC,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;YAC9D,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,MAAM,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtC,IAAI,CAAC,cAAc,EAAE,CAAC;YACxB,CAAC;YACD,SAAS,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;YAC7F,WAAW,EAAE,OAAO,EAAE,kBAAkB,IAAI,IAAI;SACjD,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACxC,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,6BAA6B,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;IACtG,CAAC;CACF"}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import type { Setting } from "../../settings/Settings.js";
|
|
3
2
|
import { LabelListItem, type LabelListItemOptions } from "./LabelListItem.js";
|
|
4
|
-
import type { UiComponent
|
|
5
|
-
export type SettingListItemOptions
|
|
3
|
+
import type { UiComponent } from "./UiComponent.js";
|
|
4
|
+
export type SettingListItemOptions = ThisType<SettingListItem> & LabelListItemOptions & {
|
|
6
5
|
/**
|
|
7
6
|
* Will be invoked when the user checks the checkbox.
|
|
8
7
|
*/
|
|
9
|
-
readonly onCheck
|
|
8
|
+
readonly onCheck?: (isBatchProcess?: boolean) => void | Promise<void>;
|
|
10
9
|
/**
|
|
11
10
|
* Will be invoked when the user unchecks the checkbox.
|
|
12
11
|
*/
|
|
13
|
-
readonly onUnCheck
|
|
12
|
+
readonly onUnCheck?: (isBatchProcess?: boolean) => void | Promise<void>;
|
|
14
13
|
/**
|
|
15
14
|
* Should the user be prevented from changing the value of the input?
|
|
16
15
|
*/
|
|
17
|
-
readonly readOnly
|
|
16
|
+
readonly readOnly?: boolean;
|
|
18
17
|
};
|
|
19
|
-
export declare class SettingListItem<TSetting extends Setting = Setting
|
|
20
|
-
|
|
18
|
+
export declare class SettingListItem<TSetting extends Setting = Setting> extends LabelListItem {
|
|
19
|
+
readonly options: SettingListItemOptions;
|
|
21
20
|
readonly setting: TSetting;
|
|
22
21
|
readonly checkbox?: JQuery;
|
|
23
22
|
readOnly: boolean;
|
|
@@ -30,9 +29,10 @@ export declare class SettingListItem<TSetting extends Setting = Setting, TOption
|
|
|
30
29
|
* @param setting The setting this element is linked to.
|
|
31
30
|
* @param options Options for this list item.
|
|
32
31
|
*/
|
|
33
|
-
constructor(
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
constructor(parent: UiComponent, setting: TSetting, label: string, options?: SettingListItemOptions);
|
|
33
|
+
toString(): string;
|
|
34
|
+
check(isBatchProcess?: boolean): Promise<void>;
|
|
35
|
+
uncheck(isBatchProcess?: boolean): Promise<void>;
|
|
36
36
|
refreshUi(): void;
|
|
37
37
|
}
|
|
38
38
|
//# sourceMappingURL=SettingListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/SettingListItem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"SettingListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/SettingListItem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC,eAAe,CAAC,GAC5D,oBAAoB,GAAG;IACrB;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtE;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExE;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEJ,qBAAa,eAAe,CAAC,QAAQ,SAAS,OAAO,GAAG,OAAO,CAAE,SAAQ,aAAa;IACpF,SAAiB,OAAO,EAAE,sBAAsB,CAAC;IACjD,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;;;;;OAQG;gBAED,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,sBAAsB;IA8BlC,QAAQ,IAAI,MAAM;IAIZ,KAAK,CAAC,cAAc,UAAQ;IAM5B,OAAO,CAAC,cAAc,UAAQ;IAMpC,SAAS,IAAI,IAAI;CAkBlB"}
|