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AM5BN,EAAkB/I,SAAQ,SAAUyJ,GAChCA,EAAcL,iBAAiB,SAAS,WACpC,IAEIC,EAFYI,EAAcH,QAAQ,4BACXC,cAAc,0BAClBA,cAAc,SACrCvB,EAAoBqB,SAK5BL,EAAyBhJ,SAAQ,SAAU0J,GACvCA,EAAwBN,iBAAiB,SAAQ,WAC7C,IAEIC,EAFYK,EAAwBJ,QAAQ,4BACrBC,cAAc,0BAClBA,cAAc,SACrCvB,EAAoBqB,SAKxBJ,GACAA,EAAkBG,iBAAiB,SAAS,SAAUO,GAE9CA,EAAM5R,OAAO8L,UAAUC,SAAS,oBArEpD,WACI,IAAI8F,EAAuBtS,SAAS4R,eAAe,0BACnD,GAAIU,EAAsB,CACtB,IAEIP,EAFYO,EAAqBN,QAAQ,4BAClBC,cAAc,0BAClBA,cAAc,SACrCvB,EAAoBqB,IAgERQ,UAUpB7O,eAAeC,cACwB,eAAnC3B,MAAAA,OAAA,EAAAA,EAAgB2Q,kBAEhB5P,EAAU6P,eAAepC,EAAmBC,GAEhD1N,EAAU8P,yBAAyB3S,EAAE4B,GAAMlB,KAAK,oBAIpDmC,EAAUyP,kBAAkBtS,EAAG4B,GAC/BiB,EAAU2P,eAAexS,EAAG4B,GAC5BiB,EAAU0P,wBAAwBvS,EAAG4B,GAOrCgR,aAAY,WACR/P,EAAUgQ,iBAAiB7S,EAAGA,EAAE4B,GAAMlB,KAAK,+BAC5C,KAMHmC,EAAUiQ,wB,oEApLU,S","sources":["webpack://google-spreadsheet-to-wp-table-sync/./assets/src/scripts/Chunk/Frontend/create_tab.js","webpack://google-spreadsheet-to-wp-table-sync/webpack/bootstrap","webpack://google-spreadsheet-to-wp-table-sync/./assets/src/scripts/Chunk/Frontend/common_func.js","webpack://google-spreadsheet-to-wp-table-sync/./assets/src/scripts/Chunk/Frontend/data_tables_async.js","webpack://google-spreadsheet-to-wp-table-sync/./assets/src/scripts/Chunk/Frontend/data_table_default.js"],"sourcesContent":["jQuery(document).ready(function ($) {\r\n class ManageTab {\r\n constructor() {\r\n this.events();\r\n this.showFirstTabContent();\r\n }\r\n events() {\r\n var buttons = $('.tab_hidden_input');\r\n\r\n buttons.each(function () {\r\n $(this).on(\"click\", function (e) {\r\n let target = e.currentTarget;\r\n\r\n $(target)\r\n .parents(\".tabs_container\")\r\n .find(`.tab_contents .tab-content`)\r\n .removeClass(\"active\");\r\n\r\n let inputID = $(target).data(\"id\");\r\n\r\n $(`#${inputID}`).addClass('active');\r\n });\r\n })\r\n }\r\n\r\n showContent(e) {\r\n target\r\n .parents(\".tab_bottom_side\")\r\n .find(`.tab_contents .tab-content`)\r\n .removeClass(\"active\");\r\n\r\n let inputID = target.attr(\"id\").match(/(\\d+)/)[0];\r\n\r\n target\r\n .parents(\".tab_bottom_side\")\r\n .find(`.tab_contents #tab-content${inputID}`)\r\n .addClass(\"active\");\r\n }\r\n\r\n // Add checked in tabs and get the design.\r\n showFirstTabContent() {\r\n $(\".tabs_container\").each(function () {\r\n $(this)\r\n .find(\".tab_hidden_input:first\")\r\n .prop(\"checked\", true);\r\n });\r\n }\r\n\r\n }\r\n new ManageTab();\r\n});\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// Frontend Data table design and other config applied like pagination, shorting and so on \r\n\r\nexport default class Global_Table_Config {\r\n table_configuration($, i, elem, table_name, table_settings, sheetUrl) {\r\n let dom = `<\"filtering_input filtering_input_${i}\"${\r\n table_settings?.show_x_entries ? \"l\" : \"\"\r\n }${\r\n table_settings?.search_bar ? \"f\" : \"\"\r\n }>rt<\"bottom_options bottom_options_${i}\"${\r\n table_settings?.show_info_block ? \"i\" : \"\"\r\n }${ table_settings?.pagination ? \"p\" : \"\"}>`;\r\n\r\n if (this.isProPluginActive()) {\r\n dom = `B<\"filtering_input filtering_input_${i}\"${\r\n table_settings?.show_x_entries ? \"l\" : \"\"\r\n }${\r\n table_settings?.search_bar ? \"f\" : \"\"\r\n }>rt<\"bottom_options bottom_options_${i}\"${\r\n table_settings?.show_info_block ? \"i\" : \"\"\r\n }${ table_settings?.pagination ? \"p\" : \"\"}>`;\r\n\r\n // change the cell format according to feature saved at database\r\n this.changeRedirectionType(\r\n table_settings?.redirection_type,\r\n $(elem).find(\"#create_tables a\"),\r\n $\r\n );\r\n }\r\n\r\n // For free it need to use without pro checked\r\n this.changeCellFormat(\r\n table_settings?.cell_format,\r\n $(elem).find(\"#create_tables th, td\"),\r\n $\r\n );\r\n\r\n if ( $.fn.DataTable && $(elem).find(\"#create_tables\").length ) {\r\n $(elem).find(\"#create_tables\").DataTable(this.table_obj($, table_name, table_settings, dom));\r\n }\r\n\r\n this.setPdfUrl(sheetUrl, $(elem).find(\".dt-buttons\"));\r\n\r\n if (this.isProPluginActive()) {\r\n this.reveal_export_btns($, elem, table_settings);\r\n }\r\n\r\n this.swap_input_filter($, i, table_settings);\r\n\r\n this.swap_bottom_options($, i, table_settings);\r\n }\r\n\r\n changeRedirectionType(type, links, $) {\r\n if (!links.length) return;\r\n $.each(links, function (i, link) {\r\n $(link).attr(\"target\", type);\r\n });\r\n }\r\n\r\n changeCellFormat(formatStyle, tableCell, $) {\r\n switch (formatStyle) {\r\n case \"wrap\":\r\n $.each(tableCell, function (i, cell) {\r\n $(cell).removeClass(\"clip_style\");\r\n $(cell).removeClass(\"expanded_style\");\r\n $(cell).addClass(\"wrap_style\");\r\n });\r\n break;\r\n\r\n case \"clip\":\r\n $.each(tableCell, function (i, cell) {\r\n $(cell).removeClass(\"wrap_style\");\r\n $(cell).removeClass(\"expanded_style\");\r\n $(cell).addClass(\"clip_style\");\r\n });\r\n break;\r\n case \"expand\":\r\n $.each(tableCell, function (i, cell) {\r\n $(cell).removeClass(\"clip_style\");\r\n $(cell).removeClass(\"wrap_style\");\r\n $(cell).addClass(\"expanded_style\");\r\n });\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n isProPluginActive() {\r\n if (front_end_data.isProActive || front_end_data.isProActive != '') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n getSpreadsheetID(url) {\r\n if (!url || url == \"\") return;\r\n\r\n let sheetID = null;\r\n\r\n sheetID = url.split(/\\//)[5];\r\n\r\n if (sheetID) return sheetID;\r\n\r\n return null;\r\n }\r\n\r\n getGridID(url) {\r\n if (!url || url == \"\") return;\r\n\r\n let gridID = null;\r\n\r\n gridID = url.match(/gid=(\\w+)/);\r\n\r\n if ( gridID != null ) {\r\n gridID = gridID[1];\r\n }\r\n\r\n if (gridID) {\r\n return gridID;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n //PDF Export as PDF\r\n setPdfUrl(url, elem) {\r\n let spreadsheetID = this.getSpreadsheetID(url);\r\n let gridID = this.getGridID(url);\r\n let pdfUrl = `https://docs.google.com/spreadsheets/d/${spreadsheetID}/export?format=pdf&id=${spreadsheetID}&gid=${gridID}`;\r\n // Forntend part design `\r\n \r\n \r\n \r\n `\r\n );\r\n }\r\n \r\n table_obj($, table_name, table_settings, dom) {\r\n\r\n let table_object = {\r\n dom: dom,\r\n order: [],\r\n // order: [[0, 'asc']],\r\n responsive: true,\r\n lengthMenu: [\r\n [1, 5, 10, 15, 30],\r\n [\r\n front_end_data.strings['1'],\r\n front_end_data.strings['5'],\r\n front_end_data.strings['10'],\r\n front_end_data.strings['15'],\r\n front_end_data.strings['30'],\r\n ]\r\n ],\r\n language: {\r\n search: front_end_data.strings['search'],\r\n searchPlaceholder: \"Search items\",\r\n lengthMenu: front_end_data.strings['filtering_show'] + \" _MENU_ \" + front_end_data.strings['filtering_entries'],\r\n info: front_end_data.strings['dataTables_info_showing'] + \" _START_ \" + front_end_data.strings['dataTables_info_to'] + \" _END_ \" + front_end_data.strings['dataTables_info_of'] + \" _TOTAL_ \" + front_end_data.strings['filtering_entries'],\r\n\r\n emptyTable: front_end_data.strings['data-empty-notice'],\r\n zeroRecords: front_end_data.strings['data-empty-notice'],\r\n paginate: {\r\n first: \"first\",\r\n previous: front_end_data.strings['previous'],\r\n next: front_end_data.strings['next'],\r\n last: front_end_data.strings['last'],\r\n },\r\n },\r\n pageLength: parseInt(table_settings.default_rows_per_page),\r\n lengthChange: true,\r\n ordering: table_settings.allow_sorting,\r\n destroy: true,\r\n scrollX: true,\r\n };\r\n\r\n $('.gswpts_tables_container').each(function () {\r\n let numberOfColumns = $(this).find('thead th').length;\r\n let table_object = {\r\n order: []\r\n };\r\n \r\n for (let i = 0; i < numberOfColumns; i++) {\r\n // table_object.order.push([i, 'asc']);\r\n table_object.order.push([i, '']);\r\n }\r\n });\r\n\r\n if (this.isProPluginActive()) {\r\n table_object.buttons = [\r\n {\r\n text: ``,\r\n className: \"ui inverted button export_btns json_btn\",\r\n action: function (e, dt, button, config) {\r\n var data = dt.buttons.exportData();\r\n $.fn.dataTable.fileSave(\r\n new Blob([JSON.stringify(data)]),\r\n `${table_name}.json`\r\n );\r\n },\r\n titleAttr: front_end_data.strings['export-json']\r\n },\r\n {\r\n text: ``,\r\n extend: \"csv\",\r\n className: \"ui inverted button export_btns csv_btn\",\r\n title: `${table_name}`,\r\n // titleAttr: \"Export as CSV\",\r\n titleAttr: front_end_data.strings['export-csv'],\r\n },\r\n {\r\n text: ``,\r\n extend: \"excel\",\r\n className: \"ui inverted button export_btns excel_btn\",\r\n title: `${table_name}`,\r\n titleAttr: front_end_data.strings['export-excel']\r\n },\r\n {\r\n text: ``,\r\n extend: \"print\",\r\n className: \"ui inverted button export_btns print_btn\",\r\n title: `${table_name}`,\r\n titleAttr: front_end_data.strings['print']\r\n },\r\n {\r\n text: ``,\r\n extend: \"copy\",\r\n className: \"ui inverted button export_btns copy_btn\",\r\n title: `${table_name}`,\r\n titleAttr: front_end_data.strings['copy']\r\n },\r\n ];\r\n\r\n table_object.lengthMenu = [\r\n [1, 5, 10, 15, 30, 50, 100, -1],\r\n [\r\n front_end_data.strings['1'],\r\n front_end_data.strings['5'],\r\n front_end_data.strings['10'],\r\n front_end_data.strings['15'],\r\n front_end_data.strings['30'],\r\n front_end_data.strings['50'],\r\n front_end_data.strings['100'],\r\n front_end_data.strings['All']\r\n ]\r\n ];\r\n \r\n //Column is needed to hide and backend code is not used actually to hide.\r\n if ((table_settings?.hide_on_desktop_col && this.screenSize() === \"desktop\") || (table_settings?.hide_on_mobile_col && this.screenSize() === \"mobile\")) {\r\n if (this.screenSize() === \"desktop\" && table_settings.hide_column) {\r\n table_object.columnDefs = this.hideColumnByScreen(\r\n table_settings.hide_column\r\n );\r\n } else if (this.screenSize() === \"mobile\" && table_settings.hide_column_mobile) {\r\n table_object.columnDefs = this.hideColumnByScreen(\r\n table_settings.hide_column_mobile\r\n );\r\n }\r\n } \r\n }\r\n \r\n // Table height \r\n if (table_settings.vertical_scrolling) {\r\n table_object.scrollY = `${table_settings.vertical_scrolling}px`;\r\n }\r\n\r\n return table_object;\r\n }\r\n\r\n // Return an array that will define the columns to hide\r\n hideColumnByScreen(arrayValues) {\r\n return [\r\n {\r\n targets: this.convertArrayStringToInteger(arrayValues),\r\n visible: false,\r\n searchable: false,\r\n },\r\n ];\r\n }\r\n\r\n // get the current screen size of user if greater than 740 return desktop or return mobile\r\n screenSize() {\r\n // Desktop screen size\r\n if (screen.width > 740) {\r\n return \"desktop\";\r\n } else {\r\n return \"mobile\";\r\n }\r\n }\r\n\r\n // convert string to integer from arrays\r\n convertArrayStringToInteger(arr) {\r\n if (!arr) return [];\r\n return arr.map((val) => parseInt(val));\r\n }\r\n\r\n reveal_export_btns($, elem, table_settings) {\r\n if (!table_settings) return;\r\n\r\n let export_btns = table_settings.table_export;\r\n\r\n if (export_btns != \"empty\" && export_btns) {\r\n export_btns.forEach((btn) => {\r\n $(elem)\r\n .find(\".\" + btn + \"_btn\")\r\n .removeClass(\"export_btns\");\r\n });\r\n }\r\n }\r\n\r\n swap_input_filter($, i, table_settings) {\r\n /* If checkbox is checked then swap filter */\r\n if (table_settings?.swap_filter_inputs) {\r\n $(\".filtering_input_\" + i + \"\").css(\"flex-direction\", \"row-reverse\");\r\n $(\".filtering_input_\" + i + \" > #create_tables_length\").css({\r\n \"margin-right\": \"0\",\r\n \"margin-left\": \"auto\",\r\n });\r\n $(\".filtering_input_\" + i + \" > #create_tables_filter\").css({\r\n \"margin-left\": \"0\",\r\n \"margin-right\": \"auto\",\r\n });\r\n } else {\r\n /* Set back to default position */\r\n $(\".filtering_input_\" + i + \"\").css(\"flex-direction\", \"row\");\r\n $(\".filtering_input_\" + i + \" > #create_tables_length\").css({\r\n \"margin-right\": \"auto\",\r\n \"margin-left\": \"0\",\r\n });\r\n $(\".filtering_input_\" + i + \" > #create_tables_filter\").css({\r\n \"margin-left\": \"auto\",\r\n \"margin-right\": \"0\",\r\n });\r\n }\r\n }\r\n\r\n swap_bottom_options($, i, table_settings) {\r\n let style = {\r\n flex_direction: \"row-reverse\",\r\n table_info_style: {\r\n margin_left: \"auto\",\r\n margin_right: 0,\r\n },\r\n table_paginate_style: {\r\n margin_left: 0,\r\n margin_right: \"auto\",\r\n },\r\n };\r\n\r\n if (table_settings?.swap_bottom_options) {\r\n this.bottom_option_style($, style, i);\r\n } else {\r\n style[\"flex_direction\"] = \"row\";\r\n\r\n style.table_info_style[\"margin_left\"] = 0;\r\n style.table_info_style[\"margin_right\"] = \"auto\";\r\n\r\n style.table_paginate_style[\"margin_left\"] = \"auto\";\r\n style.table_paginate_style[\"margin_right\"] = 0;\r\n\r\n this.bottom_option_style($, style, i);\r\n }\r\n }\r\n\r\n bottom_option_style($, $arg, i) {\r\n $(\".bottom_options_\" + i + \"\").css(\"flex-direction\", $arg[\"flex_direction\"]);\r\n $(\".bottom_options_\" + i + \" > #create_tables_info\").css({\r\n \"margin-left\": $arg[\"table_info_style\"][\"margin_left\"],\r\n \"margin-right\": $arg[\"table_info_style\"][\"margin_right\"],\r\n });\r\n $(\".bottom_options_\" + i + \" > #create_tables_paginate\").css({\r\n \"margin-left\": $arg[\"table_paginate_style\"][\"margin_left\"],\r\n \"margin-right\": $arg[\"table_paginate_style\"][\"margin_right\"],\r\n });\r\n }\r\n\r\n /**\r\n * Header merge \r\n */\r\n handleHeaderMergedCells($, elem) {\r\n var tableHeaders = $(elem).find('.thead-item[data-merge]');\r\n \r\n if(tableHeaders){\r\n tableHeaders.each(function (index, header) {\r\n // Check if the current header has the data-merge attribute.\r\n var dataMerge = $(header).attr('data-merge');\r\n \r\n if (dataMerge) {\r\n dataMerge = JSON.parse(dataMerge);\r\n var startCol = dataMerge[0];\r\n var numCols = dataMerge[1];\r\n \r\n // Add parentCellstart class to the starting cell\r\n $(header).addClass('parentCellstart');\r\n \r\n $(header).css({\r\n 'text-align': 'center',\r\n });\r\n \r\n // Update colspan attribute\r\n $(header).attr('colspan', numCols);\r\n \r\n // Get the next cell in the row\r\n var nextCell = $(header).next();\r\n \r\n // Loop through numCols starting from 1\r\n for (var i = 1; i < numCols; i++) {\r\n if (nextCell && nextCell.length) {\r\n $(nextCell).addClass('childCell');\r\n // nextCell.style.display = 'none'; \r\n nextCell = $(nextCell).next();\r\n }\r\n }\r\n \r\n $(elem).find('.childCell').css('display', 'none');\r\n \r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Table body merge\r\n * @param {* table body merge} $ \r\n * @param {*} elem \r\n */\r\n\r\n handleMergedCells($, elem) {\r\n var tableRows = $(elem).find('.gswpts_rows');\r\n \r\n tableRows.each(function () {\r\n var cells = $(this).find('td');\r\n \r\n cells.each(function () {\r\n if ($(this).hasClass('parentCellstart')) {\r\n\r\n // Apply the logic from the previous conversation here\r\n var dataMerge = JSON.parse($(this).attr('data-merge'));\r\n var dataIndex = JSON.parse($(this).attr('data-index'));\r\n \r\n for (var i = 0; i < dataMerge[0]; i++) {\r\n for (var j = 0; j < dataMerge[1]; j++) {\r\n var targetIndex = [\r\n dataIndex[0] + i,\r\n dataIndex[1] + j\r\n ];\r\n \r\n var targetCell = $(elem).find('[data-index=\"[' + targetIndex.join(',') + ']\"]');\r\n \r\n if (targetCell) {\r\n var cellDivContent = targetCell.find('.cell_div').text().trim();\r\n if (cellDivContent === '') {\r\n targetCell.addClass('merged-cell');\r\n targetCell.hide();\r\n\r\n if ($(this).hasClass('parentCellstart')) {\r\n $(this).css({\r\n 'text-align': 'center',\r\n 'vertical-align': 'middle'\r\n });\r\n }\r\n } else {\r\n targetCell.addClass('normal-cell');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * \r\n * Add dynamic table width in header from body td calculated on tr\r\n */\r\n\r\n handleTableWidth($, elem) {\r\n // Function to set a consistent table width for all tables\r\n function setConsistentTableWidth(width) {\r\n elem.each(function (index, container) {\r\n // Get the table element within the container\r\n var table = $(container).find(\".ui.celled.display.table.gswpts_tables.dataTable.no-footer\");\r\n // Set the table's width to the specified width\r\n table.css('width', width + \"px\");\r\n\r\n // console.log('width', width + \"px\");\r\n\r\n // When table headers are initially set to 0 width, fix it\r\n var headers = table.find(\"th\");\r\n if (headers.length > 0) {\r\n headers.each(function () {\r\n var headerWidth = $(this).width();\r\n if (headerWidth === 0) {\r\n $(this).css('width', 'auto');\r\n }\r\n });\r\n }\r\n });\r\n }\r\n \r\n // Check if elem has a prevObject property\r\n if (elem.prevObject && elem.prevObject.length > 0) {\r\n elem = elem.prevObject;\r\n }\r\n // Ensure that the desired element is present in the jQuery object\r\n if (elem.length === 0) {\r\n // console.log(\"No element found within the given object.\");\r\n return;\r\n }\r\n \r\n // Calculate the initial table width based on the first container's element\r\n var initialContainer = elem.first();\r\n // var initialContainer = elem.first()[0]; // Get the first DOM element\r\n var row = $(initialContainer).find(\"tr.gswpts_rows\");\r\n\r\n // Check if the element exists in the initial container\r\n if (row.length > 0) {\r\n // Get the bounding rectangle of the element\r\n var rect = row[0].getBoundingClientRect();\r\n // Get the total width from the bounding rectangle\r\n var initialWidth = rect.width;\r\n\r\n setConsistentTableWidth(initialWidth);\r\n }\r\n \r\n // Recalculate table width on screen resize\r\n $(window).on('resize', function () {\r\n setConsistentTableWidth(initialWidth);\r\n });\r\n }\r\n\r\n\r\n\r\n /**\r\n * Generate and load theme style into head\r\n * @param {string} themeName - The theme name to be used in the CSS class names.\r\n */\r\n loadThemeStyle($, elem) {\r\n let themeName = '';\r\n let classList = $(elem).attr('class').split(/\\s+/);\r\n let gswptsCount = 0;\r\n\r\n for (let className of classList) {\r\n if (className.startsWith('gswpts_')) {\r\n gswptsCount++;\r\n if (gswptsCount === 3) {\r\n themeName = className.replace('gswpts_', '');\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Check if the themeName is a default style\r\n if (['default-style', 'style-1', 'style-2', 'style-3', 'style-4', 'style-5', 'style-6', 'style-7', 'style-8'].includes(themeName)) {\r\n return;\r\n }\r\n \r\n\r\n // Find the table element within the provided elem\r\n const tableElem = $(elem).find('table.ui.celled.display.table.gswpts_tables');\r\n\r\n if (tableElem.length === 0) {\r\n console.error('Table element not found');\r\n return;\r\n }\r\n\r\n const tableStyles = tableElem.attr('style');\r\n\r\n let styleContent = `\r\n .gswpts_${themeName} table.ui.celled.display {\r\n border: none;\r\n border-collapse: unset;\r\n } \r\n `;\r\n\r\n\r\n // Check for border type\r\n if (tableStyles.includes('--border-type: rounded;')) {\r\n styleContent += `\r\n .gswpts_${themeName} thead th:first-child {\r\n border-radius: var(--border-radius) 0 0 0 !important\r\n }\r\n .gswpts_${themeName} thead th:last-child {\r\n border-radius: 0 var(--border-radius) 0 0 !important\r\n }\r\n .gswpts_${themeName} tr:last-child td:first-child {\r\n border-radius: 0 0 0 var(--border-radius) !important\r\n }\r\n .gswpts_${themeName} tr:last-child td:last-child {\r\n border-radius: 0 0 var(--border-radius) 0 !important\r\n }\r\n `;\r\n }\r\n\r\n \r\n // Outside border \r\n styleContent += `\r\n /* .gswpts_${themeName} tbody tr td:first-child {\r\n border-left: 1px solid var(--outside-border-color) !important;\r\n }\r\n\r\n .gswpts_${themeName} tbody tr td:last-child {\r\n border-right: 1px solid var(--outside-border-color) !important;\r\n } */\r\n\r\n .gswpts_${themeName} tbody tr:last-child td {\r\n border-bottom: 1px solid var(--outside-border-color) !important;\r\n }\r\n\r\n `;\r\n\r\n // Roundeed border \r\n if (tableStyles.includes('--border-type: rounded;')) {\r\n styleContent += `\r\n .gswpts_${themeName} thead th:first-child {\r\n border-radius: var(--border-radius) 0 0 0 !important;\r\n border-right: none !important;\r\n }\r\n\r\n .gswpts_${themeName} thead th:last-child {\r\n border-radius: 0 var(--border-radius) 0 0 !important;\r\n border-left: none !important;\r\n }\r\n\r\n .gswpts_${themeName} tr:last-child td:first-child {\r\n border-radius: 0 0 0 var(--border-radius) !important;\r\n }\r\n\r\n .gswpts_${themeName} tr:last-child td:last-child {\r\n border-radius: 0 0 var(--border-radius) 0 !important;\r\n }\r\n `;\r\n }\r\n\r\n // Check for column color activation\r\n if (tableStyles.includes('--column-color-active: 1;')) {\r\n styleContent += `\r\n .gswpts_${themeName} tbody td:nth-child(odd) {\r\n background-color: var(--body-bg-color-odd) !important;\r\n }\r\n .gswpts_${themeName} tbody td:nth-child(even) {\r\n background-color: var(--body-bg-color-even) !important;\r\n }\r\n `;\r\n }\r\n\r\n // Check for row color activation\r\n if (tableStyles.includes('--row-color-active: 1;')) {\r\n styleContent += `\r\n .gswpts_${themeName} tbody tr:nth-child(even) > td {\r\n background-color: var(--body-bg-color-even) !important;\r\n }\r\n .gswpts_${themeName} tbody tr:nth-child(odd) > td {\r\n background-color: var(--body-bg-color-odd) !important;\r\n }\r\n `;\r\n \r\n }\r\n\r\n \r\n\r\n // Hover \r\n // Check for column hover activation\r\n if (tableStyles.includes('--hover-mode-row: 1;')) {\r\n styleContent += `\r\n .gswpts_${themeName} tbody tr:hover td,\r\n .gswpts_${themeName} tbody tr:hover th {\r\n background-color: var(--hover-bg-color) !important;\r\n color: var(--hover-text-color) !important;\r\n }\r\n `;\r\n }\r\n\r\n if (tableStyles.includes('--hover-mode-col: 1;')) {\r\n styleContent += `\r\n .gswpts_${themeName} table {\r\n overflow: hidden;\r\n }\r\n .gswpts_${themeName} td, th{\r\n border: 1px solid #999;\r\n padding: 10px;\r\n position: relative;\r\n }\r\n .gswpts_${themeName} td:hover::after { \r\n background-color: var(--hover-bg-color) !important;\r\n opacity: 0.2; \r\n content: ''; \r\n height: 10000px; \r\n left: 0;\r\n position: absolute; \r\n top: -5000px;\r\n width: 100%;\r\n z-index: 1; \r\n transition: 300ms; \r\n }\r\n `;\r\n }\r\n \r\n\r\n if (tableStyles.includes('--hover-mode-none: 1;')) {\r\n styleContent += `\r\n .gswpts_${themeName} tbody td:hover,\r\n .gswpts_${themeName} tbody th:hover {\r\n background-color: var(--body-bg-color);\r\n\t\t\t\t\t\tcolor: var(--body-text-color);\r\n }\r\n `;\r\n }\r\n\r\n // Create a