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,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAa,IAAG,CAAC,CAAC,CAAC;wBAClE,MAAM;oBACR,KAAK,QAAQ;wBACX,IAAI,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;wBAC9D,UAAU,CAAC,gBAAgB,CACzB,OAAO,EACP,UAAU,CAAa;4BACrB,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;wBACpC,CAAC,EACD,KAAK,CACN,CAAC;wBACF,MAAM;gBACV,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC","file":"daytool_actions.js","sourcesContent":["import * as $ from \"jquery\";\nimport { resetNodeEvents } from \"../../helpers.js\";\nimport { DAYTOOL } from \"../daytool.js\";\nimport { daytool_ui } from \"../daytool_ui.js\";\nimport {\n div__clipboard,\n div__playtime,\n modal_layer,\n modal_toggle,\n} from \"../../constants.js\";\nimport { daytool_event, daytool_plan } from \"../daytool_entity.js\";\nimport { DAYTOOL__EVENT_SETTINGS_FORM_UI } from \"./daytool_event.js\";\nimport { DecodedAuthToken } from \"../../../../dist/@azure/msal-common/dist/account/DecodedAuthToken\";\nimport { DAYTOOL__STAT_SETTINGS_FORM_UI } from \"./daytool_stat.js\";\nimport { daytool_injector } from \"./daytool_injector.js\";\nimport { main_interface } from \"../../main_interface.js\";\n\n// !!Needed for community sync update\n// export function setNavActions() {\n// var action_divs = document.getElementById(\"block-mainnavigation\").querySelectorAll(\".action\");\n// for (var i = 0; i < action_divs.length; i++) {\n// var action_div = action_divs[action_divs.length - i - 1];\n// var parameters = action_div.dataset; // Get Data from HTML\n// if (parameters.action && parameters.action.length > 0) {\n// var actions = parameters.action.split(\",\");\n// for (var a = 0; a < actions.length; a++) {\n// var action = actions[a];\n// switch (action) {\n// case \"communitysync\":\n// action_div.addEventListener(\n// \"click\",\n// function (e: MouseEvent) {\n// // Activate or Swap\n// if (!modal_layer.classList.contains(\"show\")) {\n// modal_toggle.click();\n// }\n// daytool_ui.switchModalView(\"communitysync\");\n// },\n// false\n// );\n// break;\n// }\n// }\n// }\n// }\n// }\n\nexport function setModalActions() {\n var action_divs = document.getElementById(\"modal_layer\").querySelectorAll(\".action\");\n for (var i = 0; i < action_divs.length; i++) {\n var action_div = action_divs[action_divs.length - i - 1];\n var parameters = action_div.dataset; // Get Data from HTML\n if (parameters) {\n if (parameters.action && parameters.action.length > 0) {\n var actions = parameters.action.split(\",\");\n for (var a = 0; a < actions.length; a++) {\n var action = actions[a];\n switch (action) {\n case \"switch_modal_slide\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n var div = e.target;\n var target_div = div.closest(\n \"[data-action-parameter-toggle-target]\"\n );\n var index = parseInt(\n target_div.getAttribute(\n \"data-action-parameter-toggle-target\"\n )\n );\n var modal_parent = div.closest(\"[data-modal-state]\");\n var modal_slides =\n modal_parent.getElementsByClassName(\"modal_slide\");\n var modal_slides_buttons = modal_parent.querySelectorAll(\n '[data-action=\"switch_modal_slide\"]'\n );\n var modal_slides_title =\n modal_parent.querySelectorAll(\".slide_title\");\n for (var i = 0; i < modal_slides.length; i++) {\n if (i == index) {\n modal_slides[i].classList.add(\"active\");\n modal_slides_buttons[i].classList.add(\"active\");\n modal_slides_title[i].classList.remove(\"d-none\");\n } else {\n modal_slides[i].classList.remove(\"active\");\n modal_slides_buttons[i].classList.remove(\"active\");\n modal_slides_title[i].classList.add(\"d-none\");\n }\n }\n },\n false\n );\n break;\n case \"add\":\n action_div.addEventListener(\n \"click\",\n (e) => {\n var div = e.target;\n daytool_ui.add(div);\n },\n false\n );\n break;\n // Event Settings\n // Section controllers\n case \"event_settings__all_day_check\":\n action_div.addEventListener(\n \"change\",\n function (e: MouseEvent) {\n daytool_ui.event_settings__all_day_check(e);\n },\n false\n );\n break;\n case \"event_settings__toggle_repetition\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.event_settings__toggle_repetition(e);\n },\n false\n );\n break;\n case \"event_settings__toggle_recurrence_start\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.event_settings__toggle_recurrence_start(e);\n },\n false\n );\n break;\n case \"event_settings__toggle_recurrence_end\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.event_settings__toggle_recurrence_end(e);\n },\n false\n );\n break;\n // Repetition\n case \"event_settings__repetition_period_count\":\n action_div.addEventListener(\n \"change\",\n function (e: MouseEvent) {\n daytool_ui.event_settings__repetition_period_count(e);\n },\n false\n );\n break;\n case \"event_settings__repetition_period\":\n action_div.addEventListener(\n \"change\",\n function (e: MouseEvent) {\n daytool_ui.event_settings__repetition_period(e);\n },\n false\n );\n break;\n case \"event_settings__week_pattern\":\n action_div.addEventListener(\n \"change\",\n function (e: MouseEvent) {\n daytool_ui.event_settings__week_pattern(e);\n },\n false\n );\n break;\n // Recurrence End\n case \"event_settings__recurrence_end_repetition_number\":\n action_div.addEventListener(\n \"change\",\n function (e: MouseEvent) {\n daytool_ui.event_settings__recurrence_end_repetition_number(\n e\n );\n },\n false\n );\n break;\n // Save\n case \"event_settings__event_settings_save\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.event_settings__event_settings_save(e);\n },\n false\n );\n break;\n }\n }\n }\n }\n }\n}\n\nexport function reset_actions(DIV: any | null) {\n var reset_DIV;\n var action_divs;\n if (DIV == null) {\n reset_DIV = div__playtime;\n action_divs = [...reset_DIV.querySelectorAll(\".action\")];\n } else {\n reset_DIV = resetNodeEvents(DIV);\n action_divs = [reset_DIV, ...reset_DIV.querySelectorAll(\".action\")];\n }\n\n for (var i = 0; i < action_divs.length; i++) {\n var action_div = action_divs[action_divs.length - i - 1];\n var parameters = action_div.dataset; // Get Data from HTML\n if (parameters.action && parameters.action.length > 0) {\n var actions = parameters.action.split(\",\");\n for (var a = 0; a < actions.length; a++) {\n var action = actions[a];\n switch (action) {\n case \"logout\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n DAYTOOL.logout();\n },\n false\n );\n break;\n case \"about\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n // Activate or Swap\n if (!modal_layer.classList.contains(\"show\")) {\n modal_toggle.click();\n }\n daytool_ui.switchModalView(\"our_needs\");\n },\n false\n );\n break;\n case \"uploads\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n // Activate or Swap\n if (!modal_layer.classList.contains(\"show\")) {\n modal_toggle.click();\n }\n daytool_ui.switchModalView(\"uploads\");\n },\n false\n );\n break;\n case \"imports\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n // Activate or Swap\n if (!modal_layer.classList.contains(\"show\")) {\n modal_toggle.click();\n }\n daytool_ui.switchModalView(\"imports\");\n },\n false\n );\n break;\n case \"shares\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n // Activate or Swap\n if (!modal_layer.classList.contains(\"show\")) {\n modal_toggle.click();\n }\n daytool_ui.switchModalView(\"shares\");\n },\n false\n );\n break;\n case \"cases\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n // Activate or Swap\n if (!modal_layer.classList.contains(\"show\")) {\n modal_toggle.click();\n }\n daytool_ui.switchModalView(\"cases\");\n },\n false\n );\n break;\n case \"settings\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n // Activate or Swap\n if (!modal_layer.classList.contains(\"show\")) {\n modal_toggle.click();\n }\n daytool_ui.switchModalView(\"settings\");\n },\n false\n );\n break;\n case \"contacts\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n // Activate or Swap\n if (!modal_layer.classList.contains(\"show\")) {\n modal_toggle.click();\n }\n daytool_ui.switchModalView(\"contacts\");\n },\n false\n );\n break;\n case \"calendars\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n // Activate or Swap\n if (!modal_layer.classList.contains(\"show\")) {\n modal_toggle.click();\n }\n daytool_ui.switchModalView(\"calendars\");\n },\n false\n );\n break;\n case \"search\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n // Activate or Swap\n if (!modal_layer.classList.contains(\"show\")) {\n modal_toggle.click();\n }\n daytool_ui.switchModalView(\"search\");\n },\n false\n );\n break;\n case \"event_settings\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n // Activate or Swap\n if (!modal_layer.classList.contains(\"show\")) {\n modal_toggle.click();\n }\n var target = e.target;\n var card = target.closest(\"[data-entity-id][data-entity-type]\");\n var entity_id = card.getAttribute(\"data-entity-id\");\n var entity_type = card.getAttribute(\"data-entity-type\");\n var object = DAYTOOL.getEntityByIdAndType(\n parseInt(entity_id),\n entity_type\n );\n daytool_ui.switchModalView(\"event_settings\");\n DAYTOOL__EVENT_SETTINGS_FORM_UI.setupFormForGivenEvent(object);\n },\n false\n );\n break;\n case \"stat_settings\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n // Activate or Swap\n if (!modal_layer.classList.contains(\"show\")) {\n modal_toggle.click();\n }\n var target = e.target;\n var card = target.closest(\"[data-entity-id][data-entity-type]\");\n var entity_id = card.getAttribute(\"data-entity-id\");\n var entity_type = card.getAttribute(\"data-entity-type\");\n var object = DAYTOOL.getEntityByIdAndType(\n parseInt(entity_id),\n entity_type\n );\n daytool_ui.switchModalView(\"stat_settings\");\n DAYTOOL__STAT_SETTINGS_FORM_UI.setupFormForGivenStat(object);\n },\n false\n );\n break;\n // MODALS END\n case \"glow_and_expand\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n var target = e.target;\n if (!target.closest(\".card\").classList.contains(\"expanded\")) {\n target.closest(\".card\").classList.add(\"expanded\");\n }\n },\n false\n );\n action_div.addEventListener(\n \"mouseenter\",\n function (e: MouseEvent) {\n daytool_ui.highlight(e);\n },\n false\n );\n action_div.addEventListener(\n \"mouseleave\",\n function (e: MouseEvent) {\n daytool_ui.unhighlight(e);\n },\n false\n );\n let hoverTimeout;\n action_div.addEventListener(\n \"touchstart\",\n function (e: MouseEvent) {\n hoverTimeout = setTimeout((e) => {\n daytool_ui.highlight(e);\n }, 500);\n },\n false\n );\n action_div.addEventListener(\n \"touchend\",\n function (e: MouseEvent) {\n clearTimeout(hoverTimeout);\n daytool_ui.unhighlight(e);\n },\n false\n );\n break;\n case \"collapse\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n setTimeout(() => {\n var target = e.target;\n var card = target.closest(\".card\");\n if (card.classList.contains(\"expanded\")) {\n card.classList.remove(\"expanded\");\n }\n }, 300);\n },\n false\n );\n break;\n case \"plan_item_collapse\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n setTimeout(() => {\n var target = e.target;\n var card = target.closest(\".card\");\n if (card.classList.contains(\"expanded\")) {\n card.classList.remove(\"expanded\");\n }\n }, 300);\n },\n false\n );\n break;\n case \"import\":\n const actionParameterSrc = parameters.actionParameterSrc;\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.import(actionParameterSrc);\n },\n false\n );\n break;\n case \"input\":\n if (action_div.classList.contains(\"active\")) {\n // Do nothing\n } else {\n action_div.addEventListener(\n \"input\",\n function (e: MouseEvent) {\n // daytool_ui.openSaveButton(e);\n },\n false\n );\n // Add event listener\n action_div.addEventListener(\"change\", (e) => {\n if (e instanceof MouseEvent) {\n daytool_ui.open_event_repetition_weekly_frequency_pattern(e);\n }\n });\n action_div.classList.add(\"active\");\n }\n break;\n case \"section_change\":\n const actionParameterOptionType =\n parameters.actionParameterOptionType;\n const current_parameters = parameters;\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n var target = e.target;\n var card = target.closest(\n '[data-action-parameter-option-type-item][data-action-parameter-option-type=\"clipboard\"]'\n );\n var entity_id = parseInt(\n card.getAttribute(\"data-action-parameter-entity-id\")\n );\n var entity_type = card.getAttribute(\n \"data-action-parameter-entity-type\"\n );\n var section_type = card.getAttribute(\n \"data-action-parameter-option-type\"\n );\n var section_item = card.getAttribute(\n \"data-action-parameter-option-type-item\"\n );\n\n daytool_ui.section_change(\n section_type,\n section_item,\n entity_id,\n entity_type\n );\n },\n false\n );\n break;\n case \"delete\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n var target = e.target;\n var entityId = parseInt(target.getAttribute(\"data-entity-id\"));\n var entityType = target.getAttribute(\"data-entity-type\");\n daytool_ui.delete(entityId, entityType);\n modal_toggle.click();\n },\n false\n );\n break;\n case \"add_options\":\n const actionParameterEntityType =\n parameters.actionParameterEntityType;\n action_div.addEventListener(\n \"click\",\n (e) => {\n var div = e.target;\n daytool_ui.addOptions(actionParameterEntityType);\n },\n false\n );\n break;\n case \"add\":\n action_div.addEventListener(\n \"click\",\n (e) => {\n var div = e.target;\n daytool_ui.add(div);\n },\n false\n );\n break;\n case \"add_to_plan\":\n action_div.addEventListener(\n \"click\",\n (e) => {\n var div = e.target;\n daytool_ui.add_to_plan(div);\n },\n false\n );\n break;\n case \"add_to_goal_primary\":\n action_div.addEventListener(\n \"click\",\n (e) => {\n var div = e.target;\n daytool_ui.add_to_goal_primary(div);\n },\n false\n );\n break;\n case \"add_note_to_note\":\n action_div.addEventListener(\n \"click\",\n (e) => {\n var div = e.target;\n daytool_ui.add_note_to_note(div);\n },\n false\n );\n break;\n case \"add_to_goal_secondary\":\n action_div.addEventListener(\n \"click\",\n (e) => {\n var div = e.target;\n daytool_ui.add_to_goal_secondary(div);\n },\n false\n );\n break;\n case \"add_to_goal_bonus\":\n action_div.addEventListener(\n \"click\",\n (e) => {\n var div = e.target;\n daytool_ui.add_to_goal_bonus(div);\n },\n false\n );\n break;\n case \"add_plan_item\":\n const actionParameterType = parameters.actionParameterType;\n if (actionParameterType == \"needs\") {\n action_div.addEventListener(\n \"click\",\n (e) => {\n var div = e.target;\n daytool_plan.addNeedToPlanItem(div);\n },\n false\n );\n } else if (actionParameterType == \"notes\") {\n action_div.addEventListener(\n \"click\",\n (e) => {\n var div = e.target;\n daytool_plan.addNoteToPlanItem(div);\n },\n false\n );\n } else if (actionParameterType == \"stats\") {\n action_div.addEventListener(\n \"click\",\n (e) => {\n var div = e.target;\n daytool_plan.addStatToPlanItem(div);\n },\n false\n );\n }\n\n break;\n\n case \"external\":\n action_div.addEventListener(\n \"click\",\n (e) => {\n var div = e.target;\n daytool_ui.externalLink(\n div.getAttribute(\"data-action-parameter-href\")\n );\n },\n false\n );\n break;\n case \"toggle_pinned\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.togglePinned(e);\n },\n false\n );\n break;\n case \"toggle_pulse\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.togglePulse(e);\n },\n false\n );\n break;\n case \"checklist_complete\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.checklist_complete(e);\n },\n false\n );\n break;\n case \"checklist_remove\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.checklist_remove(e);\n },\n false\n );\n break;\n case \"delete_entity_prompt\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.delete_entity_prompt(e);\n },\n false\n );\n break;\n case \"clipboard_previous_date\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.clipboardPreviousDate();\n },\n false\n );\n break;\n case \"clipboard_next_date\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.clipboardNextDate();\n },\n false\n );\n break;\n case \"text_input\":\n var attribute = parameters.actionParameterAttribute;\n var typingTimer; // Timer identifier\n var typingDelay = 1000; // 1 seconds delay\n\n action_div.setAttribute(\n \"style\",\n \"width:100%;overflow-y: auto; scrollbar-width: thin; resize: none; max-height:500px;\"\n );\n action_div.addEventListener(\n \"input\",\n function (e: MouseEvent) {\n daytool_ui.hideTextAddButton(e);\n var target = e.target;\n var textarea = target.matches(\"textarea\")\n ? target\n : target.querySelector(\"textarea\");\n textarea.style.height = \"auto\";\n var scrollHeight = textarea.scrollHeight;\n if (scrollHeight < 12) {\n scrollHeight = 12;\n }\n textarea.style.height = scrollHeight + \"px\";\n clearTimeout(typingTimer); // Clear the previous timer\n // Set a new timer\n typingTimer = setTimeout(() => {\n daytool_ui.showTextAddButton(e);\n }, typingDelay);\n },\n false\n );\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n var target = e.target;\n var textarea = target.matches(\"textarea\")\n ? target\n : target.querySelector(\"textarea\");\n textarea.style.height = \"auto\";\n var scrollHeight = textarea.scrollHeight;\n if (scrollHeight < 12) {\n scrollHeight = 12;\n }\n textarea.style.height = scrollHeight + \"px\";\n },\n false\n );\n action_div.click();\n break;\n case \"text_input_save\":\n var attribute = parameters.actionParameterAttribute;\n // Handle textareas:\n if (attribute == \"note_string\") {\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.editNoteString(e);\n },\n false\n );\n } else if (attribute == \"description\") {\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.editDescription(e);\n },\n false\n );\n }\n\n break;\n case \"text_input_title\":\n var attribute = parameters.actionParameterAttribute;\n var typingTimer; // Timer identifier\n var typingDelay = 1500; // 1.5 seconds delay\n\n action_div.setAttribute(\n \"style\",\n \"width:100%;overflow-y: auto; scrollbar-width: thin; resize: none; max-height:500px;\"\n );\n\n if (attribute == \"title\") {\n action_div.addEventListener(\n \"input\",\n function (e: MouseEvent) {\n var target = e.target;\n var input = (\n (target.matches(\"textarea.title\")\n ? target\n : target.closest(\"textarea.title\"))\n );\n input.style.height = \"auto\";\n var scrollHeight = input.scrollHeight;\n if (scrollHeight < 24) {\n scrollHeight = 24;\n }\n input.style.height = scrollHeight + \"px\";\n clearTimeout(typingTimer); // Clear the previous timer\n // Set a new timer\n typingTimer = setTimeout(() => {\n daytool_ui.editTitle(e);\n }, typingDelay);\n },\n false\n );\n } else if (attribute == \"plan_item_title\") {\n action_div.addEventListener(\n \"input\",\n function (e: MouseEvent) {\n var target = e.target;\n var input = (\n (target.matches(\"textarea.plan_item_title\")\n ? target\n : target.closest(\"textarea.plan_item_title\"))\n );\n input.style.height = \"auto\";\n input.style.height = input.scrollHeight + \"px\";\n clearTimeout(typingTimer); // Clear the previous timer\n // Set a new timer\n typingTimer = setTimeout(() => {\n daytool_ui.editPlanItemTitle(e);\n }, typingDelay);\n },\n false\n );\n }\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n var target = e.target;\n var textarea = target.matches(\"textarea\")\n ? target\n : target.querySelector(\"textarea\");\n textarea.style.height = \"auto\";\n var scrollHeight = textarea.scrollHeight;\n if (scrollHeight < 24) {\n scrollHeight = 24;\n }\n textarea.style.height = scrollHeight + \"px\";\n },\n false\n );\n action_div.click();\n break;\n\n case \"toggle\":\n switch (parameters.actionParameterToggleTarget) {\n case \"list\":\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n var target = e.target;\n // Add active classes for desktop, mobile_active for mobile -\n var actionDiv = target.closest(\n \"[data-action-parameter-list-id]\"\n );\n var listId = actionDiv.getAttribute(\n \"data-action-parameter-list-id\"\n );\n var center_buttons_add_symbols =\n document.querySelectorAll(\".center_button\");\n var lists = document.querySelectorAll(\n \".main_view .list_container\"\n );\n var selected_container = (\n document.getElementById(listId).parentNode\n );\n var buttons = document.querySelectorAll(\n \"#crown_interface [data-action-parameter-toggle-target]\"\n );\n var activated_buttons = document.querySelectorAll(\n '#crown_interface [data-action-parameter-toggle-target][data-action-parameter-list-id=\"' +\n listId +\n '\"]'\n );\n var state = center_buttons_add_symbols[0].getAttribute(\n \"data-action-parameter-state\"\n );\n var entity_type = listId.replace(\"list_\", \"\");\n\n if (div__playtime.offsetWidth < 1200) {\n // MOBILE\n if (state == \"add_mode\") {\n // Act as symlink to list add button\n var add_button = (\n document.querySelector(\n '.list_add_button[data-action=\"add\"][data-action-parameter-entity-type=\"' +\n entity_type +\n '\"]'\n )\n );\n add_button.click();\n target.classList.add(\"mobile_active\");\n setTimeout(() => {\n target.classList.remove(\"mobile_active\");\n }, 500);\n } else if (state == \"default\") {\n // Act as list toggle\n\n // Deactivate clipboard button\n for (\n var c = 0;\n c < center_buttons_add_symbols.length;\n c++\n ) {\n center_buttons_add_symbols[c]\n .querySelector(\".microicon.add\")\n .classList.add(\"fadeOut\");\n center_buttons_add_symbols[c]\n .querySelector(\".microicon.add\")\n .classList.add(\"hidden\");\n center_buttons_add_symbols[c].classList.remove(\n \"mobile_active\"\n );\n }\n // Mobile - one list active at a time\n for (var v = 0; v < lists.length; v++) {\n lists[v].classList.remove(\"mobile_active\");\n }\n for (var b = 0; b < buttons.length; b++) {\n var curr_button = buttons[b];\n curr_button.classList.remove(\"mobile_active\");\n }\n for (var a = 0; a < activated_buttons.length; a++) {\n var activated_button = activated_buttons[a];\n activated_button.classList.add(\"mobile_active\");\n activated_button.classList.toggle(\"active\");\n }\n selected_container.classList.add(\"mobile_active\");\n // Desktop - simply toggle current list\n selected_container.classList.toggle(\"active\");\n }\n } else {\n // DESKTOP\n if (state == \"add_mode\") {\n // Act as symlink to list add button\n var add_button = (\n document.querySelector(\n '.list_add_button[data-action=\"add\"][data-action-parameter-entity-type=\"' +\n listId.replace(\"list_\", \"\") +\n '\"]'\n )\n );\n add_button.click();\n var new_entity =\n DAYTOOL.getEntityArrayByType(entity_type).at(-1);\n if (\n !DAYTOOL.clipboard.entities\n .at(-1)\n .includes(new_entity.entity_id)\n ) {\n DAYTOOL.clipboard.entities\n .at(-1)\n .push(new_entity.entity_id);\n }\n DAYTOOL.updateClipboard().then((respopnse) => {\n daytool_injector.addToClipboardDOM(new_entity);\n });\n target.classList.add(\"active\");\n setTimeout(() => {\n target.classList.remove(\"active\");\n }, 500);\n } else if (state == \"default\") {\n // Desktop - simply toggle current list\n for (var a = 0; a < activated_buttons.length; a++) {\n var activated_button = activated_buttons[a];\n activated_button.classList.toggle(\"active\");\n }\n selected_container.classList.toggle(\"active\");\n }\n }\n },\n false\n );\n break;\n }\n break;\n case \"center_button\":\n action_div.addEventListener(\"click\", function (e: MouseEvent) {\n // The main button must act as a bridge between the mobile and desktop views\n // It must also be the center of the gamification of the app\n var old_state = main_interface.center_button.getAttribute(\"data-action-parameter-state\");\n var center_buttons = document.querySelectorAll(\".center_button\");\n var lists = document.querySelectorAll(\n \".main_view .list_container:not(.clipboard)\"\n );\n var list_buttons = document.querySelectorAll(\n \"[data-action-parameter-list-id][data-action-parameter-toggle-target]\"\n );\n var icon_boxes = document.querySelectorAll(\n \".main_presentation_need_icons .icon_box\"\n );\n var new_state = \"default\";\n var list_active = false;\n // update state based on old state\n if (div__playtime.offsetWidth < 1200) {\n // if on mobile view\n if (old_state == \"default\") {\n // if a list is active - act was way to return to clipboard\n for (var l = 0; l < lists.length; l++) {\n var curr_list = lists[l];\n if (curr_list.classList.contains(\"mobile_active\")) {\n list_active = true;\n curr_list.classList.remove(\"mobile_active\");\n }\n }\n\n if (\n list_active ||\n !div__clipboard.classList.contains(\"mobile_active\")\n ) {\n // Handle list buttons\n for (var x = 0; x < list_buttons.length; x++) {\n var curr_list_button = list_buttons[x];\n curr_list_button.classList.remove(\"mobile_active\");\n }\n div__clipboard.classList.add(\"mobile_active\");\n // - SETUP NEXT STATE - add_mode - clipboard icon should show add microicon\n for (var c = 0; c < center_buttons.length; c++) {\n var curr_center_button = (\n center_buttons[c]\n );\n curr_center_button.classList.add(\"mobile_active\");\n curr_center_button\n .querySelector(\"img.add.microicon\")\n .classList.remove(\"fadeOut\");\n curr_center_button\n .querySelector(\"img.add.microicon\")\n .classList.remove(\"hidden\");\n }\n }\n\n // if clipboard is active - next state is add_mode\n else if (div__clipboard.classList.contains(\"mobile_active\")) {\n // initialize add_mode\n new_state = \"add_mode\";\n for (var i = 0; i < icon_boxes.length; i++) {\n var icon_box = icon_boxes[i];\n icon_box.classList.add(\"add_mode\");\n }\n\n for (var c = 0; c < center_buttons.length; c++) {\n var curr_center_button = (\n center_buttons[c]\n );\n curr_center_button\n .querySelector(\".add\")\n .classList.add(\"hidden\");\n curr_center_button\n .querySelector(\".return\")\n .classList.remove(\"hidden\");\n curr_center_button.classList.remove(\"active\");\n curr_center_button.classList.remove(\"mobile_active\");\n curr_center_button.classList.add(\"show_border\");\n }\n\n for (var l = 0; l < list_buttons.length; l++) {\n var curr_list_button = list_buttons[l];\n curr_list_button.classList.add(\"mobile_active\");\n }\n }\n } else if (old_state == \"add_mode\") {\n // new_state is default\n // Toggle add mode off\n for (var i = 0; i < icon_boxes.length; i++) {\n var icon_box = icon_boxes[i];\n icon_box.classList.remove(\"add_mode\");\n }\n for (var c = 0; c < center_buttons.length; c++) {\n var curr_center_button = center_buttons[c];\n curr_center_button\n .querySelector(\".add\")\n .classList.remove(\"hidden\");\n curr_center_button\n .querySelector(\".return\")\n .classList.add(\"hidden\");\n curr_center_button.classList.remove(\"show_border\");\n if (!curr_center_button.classList.contains(\"active\")) {\n curr_center_button.classList.add(\"active\");\n curr_center_button.classList.add(\"mobile_active\");\n }\n }\n for (var l = 0; l < list_buttons.length; l++) {\n var curr_list_button = list_buttons[l];\n curr_list_button.classList.remove(\"mobile_active\");\n }\n }\n } else {\n // DESKTOP - default is add_mode\n if (old_state == \"default\") {\n // initialize add_mode\n new_state = \"add_mode\";\n for (var i = 0; i < icon_boxes.length; i++) {\n var icon_box = icon_boxes[i];\n icon_box.classList.add(\"add_mode\");\n }\n\n for (var c = 0; c < center_buttons.length; c++) {\n var curr_center_button = center_buttons[c];\n curr_center_button\n .querySelector(\".add\")\n .classList.add(\"hidden\");\n curr_center_button\n .querySelector(\".return\")\n .classList.remove(\"hidden\");\n curr_center_button.classList.remove(\"active\");\n curr_center_button.classList.add(\"show_border\");\n }\n\n for (var l = 0; l < list_buttons.length; l++) {\n var curr_list_button = list_buttons[l];\n curr_list_button.classList.add(\"active\");\n }\n } else if (old_state == \"add_mode\") {\n new_state = \"default\";\n // Toggle add mode off\n for (var i = 0; i < icon_boxes.length; i++) {\n var icon_box = icon_boxes[i];\n icon_box.classList.remove(\"add_mode\");\n }\n for (var c = 0; c < center_buttons.length; c++) {\n var curr_center_button = center_buttons[c];\n curr_center_button\n .querySelector(\".add\")\n .classList.remove(\"hidden\");\n curr_center_button\n .querySelector(\".return\")\n .classList.add(\"hidden\");\n curr_center_button.classList.remove(\"show_border\");\n if (!curr_center_button.classList.contains(\"active\")) {\n curr_center_button.classList.add(\"active\");\n }\n }\n for (var l = 0; l < list_buttons.length; l++) {\n var curr_list_button = list_buttons[l];\n curr_list_button.classList.remove(\"active\");\n }\n }\n }\n\n // Set new state\n\n for (var c = 0; c < center_buttons.length; c++) {\n var curr_center_button = center_buttons[c];\n curr_center_button.setAttribute(\n \"data-action-parameter-state\",\n new_state\n );\n }\n // If goal active and only one goal - show goal timer\n // If multiple goals active - show goal icon with goals\n // If event don't disturb active - show event time left\n // If pulse - glow pulse need icon (also make secondary button show cancel)\n });\n\n break;\n case \"co_center_button\":\n action_div.addEventListener(\"click\", function (e: MouseEvent) {});\n break;\n case \"expand\":\n var expandSelector = parameters.actionParameterExpandSelector;\n action_div.addEventListener(\n \"click\",\n function (e: MouseEvent) {\n daytool_ui.expand(expandSelector);\n },\n false\n );\n break;\n }\n }\n }\n }\n}\n"]}