Download Monitor - Version 4.6.4

Version Description

  • 07.10.2022 = Fixed: Take target attribute into consideration when redirecting ( #1049 ) Changed: Removed caching of reports data, for instant data updates ( #1070 ) Fixed: Failsafe for XHR requests ( #1067 ) Fixed: Relevant XHR responses ( #1066 ) Fixed: Stop checking for file extensions when redirect ( #1065 ) Fixed: Reports data continuous retrieval when table download_log not present ( #1064 ) Fixed: Time zones logging error ( #1063 ) Added: Meta tag with Download Monitor version ( #1062 ) Fixed: Error when no button class present ( #1061 ) Fixed: Failsafe for failed database upgrade ( #1060 ) Fixed: Better display of guest downloads on Reports page ( #1056 ) Added: Reports page numbers ( #1054 ) Added: Reports page entries per page ( #1053 ) Fixed: Redirect to file when link target is _blank ( #1049 ) Added: Media Library filters for Download Monitor files ( #1047 ) Fixed: Ordering when postmeta is taken into consideration ( #1046 )
Download this release

Release Info

Developer raldea89
Plugin Icon 128x128 Download Monitor
Version 4.6.4
Comparing to
See all releases

Code changes from version 4.6.3 to 4.6.4

assets/css/admin.css CHANGED
@@ -1284,6 +1284,13 @@ table.wp-list-table .column-thumb img {
1284
  .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-heading {
1285
  font-weight: bold;
1286
  }
 
 
 
 
 
 
 
1287
  .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation {
1288
  display: flex;
1289
  flex-wrap: wrap;
@@ -1331,6 +1338,10 @@ table.wp-list-table .column-thumb img {
1331
  align-content: center;
1332
  display: flex;
1333
  }
 
 
 
 
1334
  .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions:hover {
1335
  border-color: #4338ca;
1336
  }
@@ -1529,14 +1540,21 @@ table.wp-list-table .column-thumb img {
1529
  left: 50%;
1530
  margin: -16px 0 0 -16px;
1531
  }
1532
- .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation,
1533
- .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .user-downloads-block-navigation {
1534
- min-height: 24px;
1535
  text-align: center;
1536
- padding: 14px 0 0 0;
1537
  }
1538
- .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation button,
1539
- .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .user-downloads-block-navigation button {
 
 
 
 
 
 
 
 
 
1540
  border: 0;
1541
  color: #000;
1542
  font-size: 1rem;
@@ -1545,9 +1563,9 @@ table.wp-list-table .column-thumb img {
1545
  box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
1546
  background-color: #FFF;
1547
  width: 24px;
 
1548
  }
1549
- .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation button[disabled],
1550
- .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .user-downloads-block-navigation button[disabled] {
1551
  opacity: 0.5;
1552
  cursor: default;
1553
  }
@@ -1852,6 +1870,11 @@ table.wp-list-table .column-thumb img {
1852
  display: block;
1853
  font-weight: 500;
1854
  }
 
 
 
 
 
1855
  /** Products overview page */
1856
  .post-type-dlm_product table.wp-list-table .column-title {
1857
  width: 65% !important;
1284
  .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-heading {
1285
  font-weight: bold;
1286
  }
1287
+ .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-page-actions {
1288
+ flex-wrap: wrap;
1289
+ justify-content: space-between;
1290
+ align-items: center;
1291
+ align-content: center;
1292
+ display: flex;
1293
+ }
1294
  .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation {
1295
  display: flex;
1296
  flex-wrap: wrap;
1338
  align-content: center;
1339
  display: flex;
1340
  }
1341
+ .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-per-page {
1342
+ margin-left: 10px;
1343
+ margin-right: 15px;
1344
+ }
1345
  .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions:hover {
1346
  border-color: #4338ca;
1347
  }
1540
  left: 50%;
1541
  margin: -16px 0 0 -16px;
1542
  }
1543
+ .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation {
 
 
1544
  text-align: center;
1545
+ padding: 7px 0;
1546
  }
1547
+ .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation > * {
1548
+ vertical-align: middle;
1549
+ display: inline-block;
1550
+ }
1551
+ .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation > span {
1552
+ color: grey;
1553
+ }
1554
+ .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation .dlm-reports-total-pages {
1555
+ margin-right: 15px;
1556
+ }
1557
+ .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation button {
1558
  border: 0;
1559
  color: #000;
1560
  font-size: 1rem;
1563
  box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
1564
  background-color: #FFF;
1565
  width: 24px;
1566
+ vertical-align: middle;
1567
  }
1568
+ .dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation button[disabled] {
 
1569
  opacity: 0.5;
1570
  cursor: default;
1571
  }
1870
  display: block;
1871
  font-weight: 500;
1872
  }
1873
+ .dlm_download_page_download-monitor-reports input.dlm-reports-current-page {
1874
+ display: inline-block;
1875
+ width: 75px;
1876
+ vertical-align: middle;
1877
+ }
1878
  /** Products overview page */
1879
  .post-type-dlm_product table.wp-list-table .column-title {
1880
  width: 65% !important;
assets/css/admin.less CHANGED
@@ -1171,7 +1171,6 @@ table.wp-list-table {
1171
  /* Reports */
1172
  .dlm_download_page_download-monitor-reports {
1173
 
1174
-
1175
  position: relative;
1176
 
1177
  #wpcontent {
@@ -1255,6 +1254,14 @@ table.wp-list-table {
1255
  font-weight: bold;
1256
  }
1257
 
 
 
 
 
 
 
 
 
1258
  .dlm-insights-navigation {
1259
 
1260
  .dlm-insights-tab-navigation {
@@ -1306,6 +1313,11 @@ table.wp-list-table {
1306
 
1307
  .dlm-reports-actions {
1308
 
 
 
 
 
 
1309
  flex-wrap: wrap;
1310
  justify-content: space-between;
1311
  align-items: center;
@@ -1553,11 +1565,21 @@ table.wp-list-table {
1553
  margin: -16px 0 0 -16px;
1554
  }
1555
 
1556
- .downloads-block-navigation,
1557
- .user-downloads-block-navigation {
1558
- min-height: 24px;
1559
  text-align: center;
1560
- padding: 14px 0 0 0;
 
 
 
 
 
 
 
 
 
 
 
 
1561
 
1562
  button {
1563
  border: 0;
@@ -1568,6 +1590,7 @@ table.wp-list-table {
1568
  box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
1569
  background-color: #FFF;
1570
  width: 24px;
 
1571
 
1572
  &[disabled] {
1573
  opacity: 0.5;
@@ -1960,6 +1983,12 @@ table.wp-list-table {
1960
  }
1961
  }
1962
  }
 
 
 
 
 
 
1963
  }
1964
 
1965
  /** Products overview page */
1171
  /* Reports */
1172
  .dlm_download_page_download-monitor-reports {
1173
 
 
1174
  position: relative;
1175
 
1176
  #wpcontent {
1254
  font-weight: bold;
1255
  }
1256
 
1257
+ .dlm-reports-page-actions {
1258
+ flex-wrap: wrap;
1259
+ justify-content: space-between;
1260
+ align-items: center;
1261
+ align-content: center;
1262
+ display: flex;
1263
+ }
1264
+
1265
  .dlm-insights-navigation {
1266
 
1267
  .dlm-insights-tab-navigation {
1313
 
1314
  .dlm-reports-actions {
1315
 
1316
+ .dlm-reports-per-page {
1317
+ margin-left:10px;
1318
+ margin-right:15px;
1319
+ }
1320
+
1321
  flex-wrap: wrap;
1322
  justify-content: space-between;
1323
  align-items: center;
1565
  margin: -16px 0 0 -16px;
1566
  }
1567
 
1568
+ .downloads-block-navigation {
 
 
1569
  text-align: center;
1570
+ padding: 7px 0;
1571
+ & > * {
1572
+ vertical-align: middle;
1573
+ display:inline-block;
1574
+ }
1575
+
1576
+ & > span{
1577
+ color:grey;
1578
+ }
1579
+
1580
+ .dlm-reports-total-pages {
1581
+ margin-right:15px;
1582
+ }
1583
 
1584
  button {
1585
  border: 0;
1590
  box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
1591
  background-color: #FFF;
1592
  width: 24px;
1593
+ vertical-align: middle;
1594
 
1595
  &[disabled] {
1596
  opacity: 0.5;
1983
  }
1984
  }
1985
  }
1986
+
1987
+ input.dlm-reports-current-page {
1988
+ display: inline-block;
1989
+ width: 75px;
1990
+ vertical-align: middle;
1991
+ }
1992
  }
1993
 
1994
  /** Products overview page */
assets/css/admin.min.css CHANGED
@@ -1 +1 @@
1
- .post-type-dlm_download .dlm-page-header{border-bottom:1px solid #ccc;padding:15px 60px;display:flex;justify-content:space-between;background:#fff;width:calc(100% + 20px);box-sizing:border-box;margin-left:-20px}.post-type-dlm_download .dlm-page-header .dlm-header-links{margin-left:-20px}.post-type-dlm_download .dlm-page-header .dlm-header-links a span{vertical-align:middle;position:relative;top:-2px;padding-right:10px;font-size:16px}.post-type-dlm_download .dlm-page-header .dlm-header-logo img{max-height:35px}.post-type-dlm_download td.column-shortcode .hidden{display:none}.post-type-dlm_download .inline-edit-row .inline-edit-col-dlm .inline-edit-col-dlm-inner{margin-top:10px}.dlm-settings-sub-nav{margin:0 0 10px 0;width:100%;border-bottom:1px solid #ccc;box-shadow:0 1px 1px rgba(0,0,0,.04)}.dlm-settings-sub-nav li{margin-right:10px;margin-bottom:-2px}.dlm-settings-sub-nav a{padding:13px;display:block;outline:0;box-shadow:none}.dlm-settings-sub-nav .active-section{margin-bottom:-2px}.dlm-settings-sub-nav .active-section a{border-bottom:4px solid #000;padding-bottom:9px;margin-bottom:-2px;font-weight:600}.dlm-admin-settings #setting-dlm_decimal_separator,.dlm-admin-settings #setting-dlm_thousand_separator{width:50px}.dlm-admin-settings table td{padding:15px 0}.dlm-admin-settings h3{margin:2em 0 0}.dlm-admin-settings .form-table label.dlm-radio-label{display:block;margin-bottom:5px}.dlm-admin-settings .form-table label.dlm-enhanced-radio-label{position:relative;padding:10px 15px;display:inline-block;margin-bottom:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dlm-admin-settings .form-table label.dlm-enhanced-radio-label span{z-index:3;position:relative}.dlm-admin-settings .form-table label.dlm-enhanced-radio-label input[type=radio]{position:relative;z-index:2}.dlm-admin-settings .form-table label.dlm-enhanced-radio-label input[type=radio]+div.dlm-radio__selectable-area{position:absolute;width:100%;height:100%;border-radius:20px;display:block;top:0;left:0;opacity:1;border:1px solid grey}.dlm-admin-settings .form-table label.dlm-enhanced-radio-label input[type=radio]:checked+div.dlm-radio__selectable-area{border-color:green;background-color:rgba(0,128,0,.6)}.dlm-admin-settings .form-table label.dlm-enhanced-radio-label input[type=radio]:checked+div.dlm-radio__selectable-area+span{color:#fff}.dlm-admin-settings .dlm_settings{padding:5px 0}.dlm-admin-settings .dlm_settings>th{padding:15px 5px}.dlm-admin-settings .dlm_settings>td{padding:15px 5px 15px 0}.dlm-admin-settings .dlm_install_plugin_setting{background:#fff;padding:0 15px;border-bottom:1px solid #ccc;border-top:1px solid #ccc}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group,.dlm-admin-settings .dlm_group_setting td{margin:0 auto;padding:0!important}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group .dlm-groupped-settings__box,.dlm-admin-settings .dlm_group_setting td .dlm-groupped-settings__box{margin:5px 0 5px 0}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group .dlm-groupped-settings__box .postbox,.dlm-admin-settings .dlm_group_setting td .dlm-groupped-settings__box .postbox{padding:0;margin:0 auto}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group .dlm-groupped-settings__box .postbox .hndle,.dlm-admin-settings .dlm_group_setting td .dlm-groupped-settings__box .postbox .hndle{margin:0;padding:8px;font-weight:lighter}.dlm-admin-settings .dlm_group_setting .handle-actions button{box-shadow:none}.dlm-admin-settings .dlm_group_setting h2.hndle{cursor:pointer}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group__content{padding:15px}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group__content .dlm-accordeon-group__setting{padding:35px 0;display:flex;flex-wrap:wrap;flex-direction:row;justify-content:space-between}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group__content .dlm-accordeon-group__setting .dlm-accordeon-group__setting-title{font-size:16px;margin-bottom:15px;font-weight:700;width:20%}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group__content .dlm-accordeon-group__setting .dlm-accordeon-group__setting-content{width:80%}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group__content .dlm-accordeon-group__setting .description{font-style:italic}ul.download_monitor_file_browser{list-style:none outside;margin:0;border:1px solid #ddd;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#f9f9f9;padding:5px 5px;-moz-box-shadow:inset 0 0 0 1px #fff;-webkit-box-shadow:inset 0 0 0 1px #fff;box-shadow:inset 0 0 0 1px #fff}ul.download_monitor_file_browser li{padding:0;margin:0}ul.download_monitor_file_browser li a{color:#21759b;display:block;padding:4px 0 4px 4px;text-decoration:none}ul.download_monitor_file_browser li a:hover{background-color:#eaf2fa}ul.download_monitor_file_browser li a:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f123";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.folder:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f318";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-3g2:before,ul.download_monitor_file_browser li a.filetype-3gp:before,ul.download_monitor_file_browser li a.filetype-asf:before,ul.download_monitor_file_browser li a.filetype-asx:before,ul.download_monitor_file_browser li a.filetype-avi:before,ul.download_monitor_file_browser li a.filetype-mov:before,ul.download_monitor_file_browser li a.filetype-mp4:before,ul.download_monitor_file_browser li a.filetype-mpg:before,ul.download_monitor_file_browser li a.filetype-rm:before,ul.download_monitor_file_browser li a.filetype-srt:before,ul.download_monitor_file_browser li a.filetype-vob:before,ul.download_monitor_file_browser li a.filetype-wmv:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f126";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-aif:before,ul.download_monitor_file_browser li a.filetype-iff:before,ul.download_monitor_file_browser li a.filetype-m3u:before,ul.download_monitor_file_browser li a.filetype-m4a:before,ul.download_monitor_file_browser li a.filetype-mid:before,ul.download_monitor_file_browser li a.filetype-midi:before,ul.download_monitor_file_browser li a.filetype-mp3:before,ul.download_monitor_file_browser li a.filetype-mpa:before,ul.download_monitor_file_browser li a.filetype-ra:before,ul.download_monitor_file_browser li a.filetype-wav:before,ul.download_monitor_file_browser li a.filetype-wma:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f127";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-ai:before,ul.download_monitor_file_browser li a.filetype-bmp:before,ul.download_monitor_file_browser li a.filetype-dds:before,ul.download_monitor_file_browser li a.filetype-eps:before,ul.download_monitor_file_browser li a.filetype-gif:before,ul.download_monitor_file_browser li a.filetype-ico:before,ul.download_monitor_file_browser li a.filetype-jpeg:before,ul.download_monitor_file_browser li a.filetype-jpg:before,ul.download_monitor_file_browser li a.filetype-png:before,ul.download_monitor_file_browser li a.filetype-ps:before,ul.download_monitor_file_browser li a.filetype-psd:before,ul.download_monitor_file_browser li a.filetype-pspimage:before,ul.download_monitor_file_browser li a.filetype-svg:before,ul.download_monitor_file_browser li a.filetype-tga:before,ul.download_monitor_file_browser li a.filetype-thm:before,ul.download_monitor_file_browser li a.filetype-tif:before,ul.download_monitor_file_browser li a.filetype-yuv:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f128";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li.nofiles{color:#999;font-style:italic;padding:4px 0}ul.download_monitor_file_browser li ul{list-style:none outside;margin:0;padding:0 0 0 28px}ul.download_monitor_file_browser li ul.loading{background:url(../images/ajax-loader.gif) no-repeat 24px 0;height:32px}table.wp-list-table .column-thumb{width:44px;text-align:center;white-space:nowrap}table.wp-list-table .column-dlm_download_cat,table.wp-list-table .column-dlm_download_tag,table.wp-list-table .column-file{width:11%!important}table.wp-list-table .column-file,table.wp-list-table .column-title{width:17%!important}table.wp-list-table .column-download_id,table.wp-list-table .column-version{width:5em}table.wp-list-table th.column-download_count span:first-child,table.wp-list-table th.column-featured span:first-child,table.wp-list-table th.column-locked_download span:first-child,table.wp-list-table th.column-members_only span:first-child,table.wp-list-table th.column-redirect_only span:first-child,table.wp-list-table th.column-thumb span:first-child{float:none;display:inline-block;width:1em;height:1em;line-height:1em;padding:2px 0 0 0;overflow:hidden}table.wp-list-table th.column-download_count .sorting-indicator,table.wp-list-table th.column-featured .sorting-indicator,table.wp-list-table th.column-locked_download .sorting-indicator,table.wp-list-table th.column-members_only .sorting-indicator,table.wp-list-table th.column-redirect_only .sorting-indicator,table.wp-list-table th.column-thumb .sorting-indicator{float:right}table.wp-list-table th.column-thumb{width:52px;text-align:center}table.wp-list-table th.column-thumb span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f128";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-download_count{width:5em}table.wp-list-table th.column-download_count span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f346";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-locked_download,table.wp-list-table th.column-members_only{width:3.5em}table.wp-list-table th.column-locked_download span:first-child:before,table.wp-list-table th.column-members_only span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f160";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-redirect_only{width:3.5em}table.wp-list-table th.column-redirect_only span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f103";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-featured{width:3.5em}table.wp-list-table th.column-featured span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f155";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table td.column-download_count,table.wp-list-table td.column-featured,table.wp-list-table td.column-locked_download,table.wp-list-table td.column-members_only,table.wp-list-table td.column-redirect_only{text-align:left;padding-left:11px}table.wp-list-table td.column-download_count span.na,table.wp-list-table td.column-featured span.na,table.wp-list-table td.column-locked_download span.na,table.wp-list-table td.column-members_only span.na,table.wp-list-table td.column-redirect_only span.na{color:#999;width:1em;height:1em;line-height:1em;display:inline-block;overflow:hidden;vertical-align:middle}table.wp-list-table td.column-download_count span.na:before,table.wp-list-table td.column-featured span.na:before,table.wp-list-table td.column-locked_download span.na:before,table.wp-list-table td.column-members_only span.na:before,table.wp-list-table td.column-redirect_only span.na:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table td.column-download_count span.yes,table.wp-list-table td.column-featured span.yes,table.wp-list-table td.column-locked_download span.yes,table.wp-list-table td.column-members_only span.yes,table.wp-list-table td.column-redirect_only span.yes{width:1em;height:1em;line-height:1em;display:inline-block;overflow:hidden;vertical-align:middle}table.wp-list-table td.column-download_count span.yes:before,table.wp-list-table td.column-featured span.yes:before,table.wp-list-table td.column-locked_download span.yes:before,table.wp-list-table td.column-members_only span.yes:before,table.wp-list-table td.column-redirect_only span.yes:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f147";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table .column-thumb img{padding:2px;margin:0;border:1px solid #dfdfdf;vertical-align:middle;width:32px;height:32px}#download-monitor-file .inside{padding:0;margin:0}#download-monitor-file .dlm-metaboxes-wrapper .close_all,#download-monitor-file .dlm-metaboxes-wrapper .expand_all{float:right;margin-left:1em;line-height:22px;text-decoration:none}#download-monitor-file .dlm-metaboxes-wrapper .expand_all:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f168";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .close_all:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper p.toolbar{margin:0!important;border-top:1px solid #fff;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-file .dlm-metaboxes-wrapper p.toolbar a.button{float:left;margin:0}#download-monitor-file .dlm-metaboxes-wrapper .fr,#download-monitor-file .dlm-metaboxes-wrapper button.add_attribute,#download-monitor-file .dlm-metaboxes-wrapper button.add_variable_attribute,#download-monitor-file .dlm-metaboxes-wrapper select.attribute_taxonomy{float:right;margin:0 0 0 6px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metaboxes{padding:0 12px 0}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metaboxes.dlm-versions-tab{display:flex;justify-content:space-between;flex-wrap:wrap;border-top:1px solid #dfdfdf}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin:9px 0;border-width:1px;border-style:dashed}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files{padding:0;margin:15px}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files .downloadable_file{background:#fff;border-radius:4px}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files .downloadable_file .dlm-version-info{display:inline-block}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files .downloadable_file .dlm-version-info>span{font-size:13px;font-weight:400;margin-right:20px}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files .downloadable_file .dlm-version-info>span:first-child{border:1px solid #ccc;padding:2px 3px;border-radius:5px}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files .downloadable_file .dlm-version-info>span .dashicons{margin-right:5px;color:#787C8250}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files .downloadable_file .dlm-version-info .dlm-version-info__version{background:rgba(206,206,206,.5);padding:3px 5px}#download-monitor-file .dlm-metaboxes-wrapper .drag-drop #drag-drop-area{border:4px dashed #c3c4c7;height:140px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox-content{padding-top:5px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row{width:calc(100% - 30px);position:relative;margin:10px 0;padding:0 15px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row>*,#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row>.dlm-file-version__file_present>*{width:100%}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row>.dlm-file-version__file_present>:not(.hidden,.dlm-uploader-editor),#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row>:not(.hidden,.dlm-uploader-editor){display:block}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row .dlm-file-version__flex{display:flex;flex-direction:row;justify-content:space-between;align-content:center;align-items:center}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row .dlm-file-version__flex *{display:inline-block;vertical-align:middle}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row .dlm-file-version__inline>*{display:inline-block;vertical-align:middle;margin-right:25px;margin-bottom:25px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row .dlm-file-version__date>*{display:inline-block;width:auto}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row .dlm-file-version__hashes{display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:25px}#download-monitor-file .dlm-metaboxes-wrapper #dlm-new-upload{padding:0 15px}#download-monitor-file .dlm-metaboxes-wrapper #dlm-new-upload,#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__uploader{position:relative}#download-monitor-file .dlm-metaboxes-wrapper #dlm-new-upload .drag-drop .drag-drop-inside,#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__uploader .drag-drop .drag-drop-inside{width:100%;margin-top:25px}#download-monitor-file .dlm-metaboxes-wrapper #dlm-new-upload .drag-drop .drag-drop-inside .dlm_browse_for_file,#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__uploader .drag-drop .drag-drop-inside .dlm_browse_for_file{float:none}#download-monitor-file .dlm-metaboxes-wrapper .dlm-uploading-file{background:#f0f0f0;position:absolute;overflow:hidden;width:100%;height:100%;top:0;left:0;z-index:989}#download-monitor-file .dlm-metaboxes-wrapper .dlm-uploading-file:before{content:"";position:absolute;left:0;height:3px;width:100%;right:0;top:0;background:#d8d8d8}#download-monitor-file .dlm-metaboxes-wrapper .dlm-uploading-file label{text-align:center;padding:5px 0 7px 0;position:absolute;top:50%;transform:translateY(-50%);width:100%}#download-monitor-file .dlm-metaboxes-wrapper .dlm-uploading-file label.hidden{display:none}#download-monitor-file .dlm-metaboxes-wrapper .dlm-uploading-file label span{font-weight:700}#download-monitor-file .dlm-metaboxes-wrapper .dlm-uploading-file .dlm-uploading-progress-bar{background:#2271b1;height:3px;position:absolute;top:0}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox{border:1px solid #cecece;margin:10px 0!important;box-shadow:0 4px 6px rgba(0,0,0,.05)}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3{margin:0!important;padding:10px 10px 8px 10px!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:pointer;position:relative;border-bottom:1px solid #cecece}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3:before{content:"\f140";display:block;font:normal 22px/1 dashicons;speak:none;position:absolute;right:15px;color:#787c82}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3.opened:before{content:"\f142"}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 span.remove_file{float:right;margin-right:30px;color:#787C8250;transition-duration:.2s;position:relative}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 span.remove_file:hover{color:red}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 strong{line-height:30px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 select{font-family:sans-serif}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 .handlediv{background-position:6px 5px!important;display:none!important;height:24px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox:hover h3 .handlediv{display:block}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox .dlm-download-count-button{width:auto;min-width:50px;display:inline-block}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table{width:100%;position:relative;background:#fff;padding:3px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td{text-align:left;padding:6px 6px;vertical-align:top;border:0;line-height:26px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td label{text-align:left;display:block;line-height:21px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td .dlm-uploading-file label{text-align:center}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input{float:left;min-width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td textarea{width:100%;margin:0;display:block;font-size:14px;padding:4px;color:#555}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td textarea{height:7.5em}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td select{width:100%}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.short{width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.checkbox{width:auto;min-width:inherit;vertical-align:middle;display:inline;float:none}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.date-picker-field{width:50%;min-width:inherit;float:none;display:inline}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.hour,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.minute{width:2em;min-width:inherit;float:none;display:inline}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td.attribute_name{width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .minus,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .plus{margin-top:6px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .fl{float:left}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .fr{float:right}#download-monitor-file .dlm-metaboxes-wrapper .plus:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f132";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .minus:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_upload_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f317";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_media_library:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f104";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_browse_for_file{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm_browse_for_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f322";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_browse_for_file .dlm_browse_for_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f322";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_external_source:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f103";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-information .dlm_information_panel div p{overflow:hidden;width:100%;font-weight:700;box-sizing:border-box;line-height:28px;margin-bottom:5px}#download-monitor-information .dlm_information_panel input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1;width:calc(100% - 45px)}#download-monitor-product-information .dlm_information_panel div p{overflow:hidden;width:100%;font-weight:700;box-sizing:border-box;line-height:28px;margin-bottom:5px}#download-monitor-product-information .dlm_information_panel input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1;width:calc(100% - 45px)}#download-monitor-options .inside{padding:0;margin:0}#download-monitor-options .form-field-checkbox label{display:inline;padding:0 0 4px}#download-monitor-options .form-field-checkbox input{display:inline-block;width:auto;vertical-align:middle}#download-monitor-options .form-field-checkbox .dlm-description{padding:4px 0 0 0;display:block}#download-monitor-options .access_permissions{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-options .access_permissions h4{margin-bottom:.5em;margin:0 0 .5em}#download-monitor-options .access_permissions ul{background:#fff;border:1px solid #dfdfdf;height:110px;overflow:auto;padding:.5em .9em;margin:0}#download-monitor-options p{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-options p.not-active{opacity:.7}#download-monitor-options .options_upsell_link{color:unset;text-decoration:none}#download-monitor-options .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:5px;border-radius:10px}#download-monitor-options .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:5px;border-radius:10px}#insert-download{padding:20px 20px}#insert-download #drag-drop-area,#insert-download #insert-shortcode{margin:1em 0}#insert-download .error,#insert-download .updated{margin-left:0;margin-right:0}#insert-download h2{margin-top:0}#insert-download label{margin:0 0 .25em 0;display:block;font-size:1.1em}#insert-download span.description{display:block}#insert-download input.input{margin:0 0 .25em 0;display:block;width:100%;font-size:1.1em}#insert-download .add_link{float:right}#insert-download ul.page-numbers{overflow:hidden;zoom:1;margin:0 auto;padding:0;text-align:center}#insert-download ul.page-numbers li{display:inline-block;margin:0;list-style:none outside;line-height:1em}#insert-download ul.page-numbers li a,#insert-download ul.page-numbers li span{text-decoration:none;border:1px solid #ddd;-webkit-border-radius:4px;border-radius:4px;padding:8px;display:block}#insert-download ul.page-numbers li span{border-color:#eee}#insert-download legend{font-weight:700;display:block;margin:0 0 1em}#insert-download fieldset label{display:block;margin:0 0 .5em}.dlm-code-nginx-rules{display:block}.settings_panel .form-table td{padding-left:0}.settings_panel .dlm-lazy-select-loader{display:inline-block;vertical-align:middle;padding:0 0 0 3px}.settings_panel .dlm-lazy-select-loader img{display:inline-block;height:25px;width:25px;margin-top:1px}.dlm_download_page_download-monitor-reports{position:relative}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports{margin:40px;position:relative}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-spinner{position:absolute;top:0;left:0;width:100%;height:100%;background:#fff;z-index:9999;color:#000;text-align:center}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-spinner span{display:inline-block;width:80px;height:80px}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-spinner span::after{content:" ";display:block;width:64px;height:64px;margin:8px;border-radius:50%;border:6px solid #000;border-color:#000 transparent #000 transparent;animation:dlmRotate 1.2s linear infinite}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .reports-block{background-color:#fff;margin-top:25px;border:1px solid #e0e0e0;box-sizing:border-box}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .half-reports-block{width:calc(50% - 45px)}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-loading-data{display:flex;flex-flow:column;align-items:center;justify-content:center;align-content:center;position:absolute;top:0;text-align:center;width:100%;height:100%;background:#fff;max-width:100%;margin:0 auto;font-size:36px;z-index:30}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header{display:flex;justify-content:space-between;background-color:#fff;border:1px solid #ddd}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-heading{font-weight:700}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation{display:flex;flex-wrap:wrap;justify-content:flex-start;border-bottom:1px solid #e0e0e0;overflow:hidden;margin:0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation .dlm-insights-tab-navigation__element{width:33%;min-width:200px;height:100%;padding:24px;cursor:pointer;margin-bottom:0;background-color:#f8f9fa;border-top:4px solid;border-top-color:#f1f1f1;border-left:1px solid #e0e0e0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation .dlm-insights-tab-navigation__element:last-of-type{border-right:1px solid #e0e0e0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation .dlm-insights-tab-navigation__element.active{background-color:#fff;border-top-color:#3858e9}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation .dlm-insights-tab-navigation__element .dlm-insights-tab-navigation__label{display:block;width:100%;font-size:16px;font-weight:700}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation .dlm-insights-tab-navigation__element .dlm-insights-tab-navigation__description{display:block;width:100%;font-size:12px;font-style:italic;color:#646161}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions{flex-wrap:wrap;justify-content:space-between;align-items:center;align-content:center;display:flex}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions:hover{border-color:#4338ca}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions:focus{border-color:#4338ca;box-shadow:0 0 3px #4338ca}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-period,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions a.dlm-reports-header-chart-switcher{margin:0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector{display:flex;align-items:center;min-height:32px;position:relative;font-size:14px;padding:0 .5em 0 5px;user-select:none;cursor:pointer;margin:0 15px;transition:.8s ease-in;opacity:1;min-width:230px}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector.disabled{pointer-events:none;opacity:0;display:none}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector>label{font-size:12px;font-style:italic;top:-20px;display:block;width:100%;position:absolute}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm-reports-header-period{display:flex;align-content:center;align-items:center;border:1px solid #ccc;border-left:0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm-reports-header-period a,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm-reports-header-period a:hover{height:100%;border:0;background:#fff;box-shadow:none}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm-reports-header-period a.active,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm-reports-header-period a:hover.active{background:#ccc}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector #dlm_date_range_picker .date-picker-wrapper{background:#fff;border:0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm-arrow:before{font-family:dashicons!important;content:"\f140";font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;text-align:center;font-variant:normal;text-transform:none;font-size:1.6em;vertical-align:middle}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay{display:flex;width:auto;background:#fff;position:absolute;top:30px;right:0;z-index:10;overflow:hidden;border-radius:5px;box-shadow:0 0 3px rgba(0,0,0,.6)}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date{font-size:70%;margin-right:5px;float:left;z-index:11;padding:15px}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline{border:0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline .ui-state-highlight{background:#e6e6e6 url(../images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;color:#555;border:1px solid #d3d3d3}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline .ui-state-active{border:1px solid #aaa;background:#fff url(../images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline td,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline th{padding:0;margin:0;line-height:2em}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline td a,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline th a{text-align:center!important}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_actions{width:70px;padding-left:10px;text-align:center;display:flex}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .footer{position:absolute;left:0;top:0;height:100%;padding-top:0;padding-bottom:0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .footer .shortcuts{border-right:1px solid rgba(0,0,0,.6);margin-top:0;margin-bottom:0;display:flex;flex-flow:column;justify-content:center;height:100%}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .footer .shortcuts a{text-align:left;padding:5px 40px 5px 10px;min-width:100px;color:#000;text-decoration:none}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .footer .shortcuts a:hover{color:#4338ca;background:rgba(204,204,204,.3)}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-chart-icon{display:block;padding-right:15px;color:#23282d}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports #dlm-toggle-settings{cursor:pointer;position:relative}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports #dlm-toggle-settings:before{color:#0081a7}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports #dlm-toggle-settings .dlm-toggle-settings__settings{width:300px;position:absolute;top:0;left:-335px;padding:15px;background:#fff;z-index:3;text-align:left;display:none}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports #dlm-toggle-settings .dlm-toggle-settings__settings.display{display:block}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports #dlm-toggle-settings .dlm-toggle-settings__settings>div{margin:15px 0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-tab-navigation__content{display:none;width:100%;flex-direction:row;justify-content:space-between;flex-wrap:wrap;position:relative}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-tab-navigation__content.active{display:flex}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm_reports_loader{position:absolute;width:32px;height:32px;top:50%;left:50%;margin:-16px 0 0 -16px}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .user-downloads-block-navigation{min-height:24px;text-align:center;padding:14px 0 0 0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation button,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .user-downloads-block-navigation button{border:0;color:#000;font-size:1rem;cursor:pointer;margin:0;box-shadow:transparent 0 0 0 0,transparent 0 0 0 0,rgba(0,0,0,.1) 0 1px 3px 0,rgba(0,0,0,.06) 0 1px 2px 0;background-color:#fff;width:24px}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation button[disabled],.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .user-downloads-block-navigation button[disabled]{opacity:.5;cursor:default}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block{position:relative;box-sizing:border-box;width:100%;overflow:hidden}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block .wpchill-tooltip i{color:inherit;opacity:.6}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block.dlm-reports-block-half{width:49%;margin-right:1%}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block.dlm-reports-block-half-right{width:49%;margin-left:1%}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block .dlm-reports-placeholder-no-data{display:inline-block;width:100%;font-size:1.5em;color:#b4b9be;font-style:italic;text-align:center}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul{width:100%}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li{position:relative}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li:not(:first-of-type){border-left:1px solid #e0e0e0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li:last-of-type{border-right:1px solid #e0e0e0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li label,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li span{display:block;width:100%}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li span{font-size:18px;line-height:28px;font-weight:700}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li:first-child label,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li:first-child span{border:none}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports-wrapper{width:100%}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports-block-summary ul{display:flex;flex-direction:row;justify-content:initial}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports-block-summary ul li{width:12.5%;padding:24px;margin:0;font-weight:600}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports-block-summary label{font-size:14px;line-height:20px;margin-bottom:16px;color:#757575;font-weight:400}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper{max-width:100%;background-color:#fff;padding:15px 24px;position:relative;border:1px solid #e0e0e0}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-reports-block-chart{width:100%;height:300px;margin-top:20px;background:#fff;overflow:hidden}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-reports-block-chart .chart-container h6{display:none}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-canvas-tooltip{border-radius:10px;color:#fff;background-color:#1f2937;opacity:1;pointer-events:none;position:absolute;transform:translate(-50%,0);transition:all .1s ease;padding:10px 15px;text-align:left;z-index:99}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-canvas-tooltip .dlm-reports-tooltip__downloads{font-size:18px;margin:0 auto;font-weight:700;position:relative;padding-left:15px}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-canvas-tooltip .dlm-reports-tooltip__downloads .dlm-reports-tooltip__downloads_pointer{width:5px;height:5px;display:inline-block;position:absolute;top:50%;transform:translateY(-50%);left:0}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-canvas-tooltip .dlm-reports-tooltip__info{font-size:12px;margin:0 auto}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-canvas-tooltip .dlm-reports-tooltip__date{font-size:13px;margin:0 auto;font-weight:600}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-reports-tooltip__line{height:calc(100% - 110px);width:0;background:0 0;z-index:1;position:absolute;top:65px!important;border:1px dashed #000}.dlm_download_page_download-monitor-reports #wpcontent #total_downloads_table_wrapper h3,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper h3{margin-top:0}.dlm_download_page_download-monitor-reports #wpcontent #total_downloads_table_wrapper.empty,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper.empty{display:none}.dlm_download_page_download-monitor-reports #wpcontent #total_downloads_table_wrapper #users_download_log,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper #users_download_log{margin-top:25px}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper{width:100%;margin-top:35px}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper #users_download_log{padding:0!important}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header{background:#f9fafb}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line{font-weight:700;display:table;width:100%;margin-bottom:17px;padding:1rem 10px}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header:not(:last-child),.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line:not(:last-child){border-bottom:1px solid #dedede}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header .dlm-reports-top-downloads__download_status,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line .dlm-reports-top-downloads__download_status{border-radius:10px;padding:10px;text-transform:capitalize}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header .dlm-reports-top-downloads__download_status.completed,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line .dlm-reports-top-downloads__download_status.completed{background:#adff2f60}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header .dlm-reports-top-downloads__download_status.redirected,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line .dlm-reports-top-downloads__download_status.redirected{background:#fffF0060}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header .dlm-reports-top-downloads__download_status.failed,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line .dlm-reports-top-downloads__download_status.failed{background:#ff000060}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header>div,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line>div{width:calc(15% - 3px);display:inline-block;text-align:left!important;flex-grow:unset!important}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header>div:last-child,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line>div:last-child{width:calc(10% - 2px);text-align:right!important}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header>div .dlm-user-reports .wpchill-tooltip,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line>div .dlm-user-reports .wpchill-tooltip{font-size:12px}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header>div .dlm-user-reports .wpchill-tooltip .wpchill-tooltip-content,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line>div .dlm-user-reports .wpchill-tooltip .wpchill-tooltip-content{font-size:16px;line-height:18px;text-align:center}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header>div .dlm-user-reports .wpchill-tooltip .wpchill-tooltip-content span,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line>div .dlm-user-reports .wpchill-tooltip .wpchill-tooltip-content span{font-size:16px;line-height:18px;text-align:center;display:block}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header a,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line a{text-decoration:none}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .user-downloads-filters .user-downloads-filters__filter,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .user-downloads-filters .user-downloads-filters__heading{display:inline-block}.dlm_download_page_download-monitor-reports div[data-id=user_reports] #user_downloads_summary ul .wpchill-tooltip,.dlm_download_page_download-monitor-reports div[data-id=user_reports] #users_downloads_table_wrapper ul .wpchill-tooltip{font-size:14px}.dlm_download_page_download-monitor-reports div[data-id=user_reports] #user_downloads_summary ul .wpchill-tooltip .wpchill-tooltip-content,.dlm_download_page_download-monitor-reports div[data-id=user_reports] #users_downloads_table_wrapper ul .wpchill-tooltip .wpchill-tooltip-content{font-size:16px;line-height:18px;text-align:center}.dlm_download_page_download-monitor-reports div[data-id=user_reports] #user_downloads_summary ul .wpchill-tooltip .wpchill-tooltip-content span,.dlm_download_page_download-monitor-reports div[data-id=user_reports] #users_downloads_table_wrapper ul .wpchill-tooltip .wpchill-tooltip-content span{font-size:16px;line-height:18px;text-align:center;display:block}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__table{width:100%;border-collapse:collapse}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__filters{background-color:#f8f9fa;border-bottom:1px solid #e2e4e7}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__filters>th{padding:16px;font-weight:700;text-align:left}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__header{font-weight:700;width:100%;margin-bottom:17px}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__header .dlm-reports-header-left,.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__header .dlm-reports-header-right{margin-bottom:15px;font-size:12px;color:#6b7280}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__header .dlm-reports-header-left{padding-left:36px}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__header .dlm-reports-header-right{text-align:right}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__line{background-color:#fff;border-bottom:1px solid #e2e4e7}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__line:hover{background-color:#e0e0e0;cursor:pointer}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__line>td{padding:16px;font-size:.8125rem;text-align:left;color:#192a3d;font-weight:500}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__line .dlm-reports-table__overflower{position:absolute;height:100%;background:#f5f5fc;z-index:-1}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__line a{color:#0081a7;padding:8px;display:block;font-weight:500}.post-type-dlm_product table.wp-list-table .column-title{width:65%!important}.dlm_mb_shop_product_information .dlm_shop_field_row{width:100%;overflow:hidden}.dlm_mb_shop_product_information .dlm_shop_field_row label.dlm_shop_field_label{display:inline-block;width:20%;height:100%;line-height:2.2em;float:left}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input{display:inline-block;width:50%;float:left}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .dlm_shop_input{width:100%;padding:5px 7px}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-selection--multiple{border:1px solid #ddd}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-search,.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-selection__choice{margin-bottom:0}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-search__field{padding-top:3px}.dlm-order-overview #dlm_empty_trash{margin-left:3px}.dlm-order-overview .wp-list-table td .column-id{width:25%}.dlm-order-details{max-width:1250px;margin-left:auto;margin-right:auto;padding-right:20px}.dlm-order-details h1{padding-bottom:25px}.dlm-order-details .dlm-order-details-main,.dlm-order-details .dlm-order-details-side{width:100%;float:left}.dlm-order-details .dlm-order-details-block{padding:0;margin-bottom:20px;line-height:1;border:1px solid #e5e5e5;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.dlm-order-details .dlm-order-details-block h2.dlm-order-details-block-title{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;border-bottom:1px solid #eee}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside{margin:6px 0 0 0;padding:6px 12px 12px;line-height:1.4em;font-size:13px}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside label{display:block;font-weight:700;padding-bottom:6px}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside p{padding:0;margin:0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul,.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul li{list-style:none;padding:0;margin:0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul li{padding:6px 0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside .dlm-order-details-current-state{width:70%;height:30px}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer .dlm-order-details-customer-image{float:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer ul li{margin-bottom:4px;padding:0}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer ul li:first-child{font-weight:700}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items{overflow:hidden}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview{width:25%;float:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview td,.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview th{padding-top:1.5em;padding-bottom:1.5em;text-align:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview th{width:50%;font-weight:400}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview td{padding-right:1em;font-weight:700}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table{width:100%}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th{text-align:center}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td:first-child,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th:first-child{text-align:left;padding-left:.5em}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th{padding-top:.5em;padding-bottom:.5em;border-bottom:2px solid #c3c1bc}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td{padding-top:1.5em;padding-bottom:1.5em;border-bottom:1px solid #c3c1bc}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-details-order-items-item-total,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-details-order-items-item-total{text-align:right;padding-right:1em}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-transaction-processor-id,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-transaction-processor-id{display:none}.dlm-order-details .dlm-order-details-block .dlm-order-details-update-successful{font-size:2em;padding:.2em .3em;color:#46b450}@media (min-width:768px){.dlm-order-details .dlm-order-details-main{width:62%;float:left}.dlm-order-details .dlm-order-details-side{width:35%;float:right}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-transaction-processor-id,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-transaction-processor-id{display:table-cell}}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-one-col{margin:0 auto;max-width:800px}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-cta{margin-top:40px;text-align:center}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col{max-width:680px;margin:40px auto 0;overflow:hidden;display:flex;justify-content:space-between;flex-wrap:wrap}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col{padding-top:2.5em;flex:1;align-self:flex-start;min-width:100%;max-width:100%}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col img{width:100%}.dlm-onboarding .dlm-onboarding-section h2{margin:60px 0 .6em;font-size:2.7em;line-height:1.3;font-weight:300;text-align:center}.dlm-onboarding .dlm-onboarding-section p{max-width:55em;margin:.6em auto 0 auto}.dlm-onboarding .dlm-onboarding-section a.button-hero{height:46px;font-size:14px;line-height:44px;padding:0 36px;font-weight:700;text-align:center}.dlm-onboarding .dlm-onboarding-pages{max-width:55em;margin:0 auto;padding:2em 0 0}.dlm-onboarding .dlm-onboarding-pages a.button-hero{width:170px}.dlm-onboarding .dlm-onboarding-pages a.button-hero.dlm-page-exists{background:#46b450;border-color:#46b450 #4a8442 #467a3f;box-shadow:0 2px 0 #467a3f;text-shadow:0 -1px 1px #4a8442,1px 0 1px #4a8442,0 1px 1px #4a8442,-1px 0 1px #4a8442}.dlm-onboarding .dlm-onboarding-pages a.button-hero.dlm-page-exists:active{box-shadow:0 2px 0 #467a3f}.dlm-onboarding .dlm-onboarding-pages td,.dlm-onboarding .dlm-onboarding-pages th{padding:1em 0;border-bottom:1px solid #ccc}.dlm-onboarding .dlm-onboarding-pages th{width:13%;min-width:6em;text-align:left}.dlm-onboarding .dlm-onboarding-pages td{padding-right:.5em;padding-left:.5em}.dlm-onboarding .dlm-onboarding-pages td.dlm-onboarding-pages-page-title{font-weight:700}@media (min-width:768px){.dlm-onboarding .dlm-onboarding-section .dlm-onboarding-pages{width:55em}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col{padding-top:0;min-width:31%;max-width:31%}}.dlm_extensions_wrap a.dlm-reload-button{float:right;position:relative;top:-40px}.dlm_extensions_wrap #available-extensions{clear:both}.dlm_extensions_wrap .dlm_extensions{padding:15px 0;overflow:hidden}.dlm_extensions_wrap .dlm_extensions .dlm_extension{background-color:#fff;width:calc(20% - 15px);margin:0 15px 15px 0;display:inline-block;vertical-align:top}.dlm_extensions_wrap .dlm_extensions .dlm_extension p{margin:0}.dlm_extensions_wrap .dlm_extensions .dlm_extension a{color:#444;text-decoration:none}.dlm_extensions_wrap .dlm_extensions .dlm_extension .dlm_extension_img_wrapper{width:100%;background:#419ccb;text-align:center}.dlm_extensions_wrap .dlm_extensions .dlm_extension .dlm_extension_img_wrapper img{max-width:100%;margin:0 auto}.dlm_extensions_wrap .dlm_extensions .dlm_extension h3{min-height:40px;padding:0 20px}.dlm_extensions_wrap .dlm_extensions .dlm_extension div.extension-desc{min-height:120px;padding:0 20px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer{padding:15px 15px 15px 0;text-align:right;background-color:#fafafa;border-top:1px solid #dcdcde}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price{font-weight:700}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price.sale{color:green}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price.sale strike{color:#444}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .button .dashicons{vertical-align:middle;font-size:16px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license{padding:0 20px 20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license div.dlm_license_error{padding:.5em;margin-bottom:15px;background:#ffffe0}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license div.dlm_license_error a{color:#00f;text-decoration:underline}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license p.license-status{padding:5px 0;margin:5px 0;background:red;font-weight:700;font-size:1.2em;color:#fff;text-align:center}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license p.license-status.active{background:green}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license input{width:100%;margin:7px 0;padding:7px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license a.button-primary{width:100%;margin:5px auto 0;color:#fff;text-align:center}#ui-datepicker-div{display:none}.wpchill-upsell{background:#fff;padding:15px;margin-top:30px;position:relative}.wpchill-upsell .wpchill-upsell-features{text-align:left;display:flex;flex-wrap:wrap;padding:20px 0}.wpchill-upsell .wpchill-upsell-features li{width:33%}.wpchill-upsell a:first-child{margin-right:10px}.wpchill-upsells-wrapper{width:100%}.wpchill-upsells-wrapper .wpchill-upsell{border:1px solid #cecece;border-radius:5px;text-align:center}.wpchill-upsells-wrapper .wpchill-upsell img{max-width:100px;max-height:100px;height:auto;width:auto}.wrap.dlm-admin-settings .form-table{width:65%;float:left}.wrap.dlm-admin-settings .form-table+.wpchill-upsells-wrapper{width:30%;float:right}.wrap.dlm-admin-settings .form-table .dlm_htaccess_notice{margin-bottom:5px}.wrap.dlm-admin-settings .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:10px;border-radius:10px}.wrap.dlm-admin-settings #setting-dlm_downloads_path+p strong{color:red}.wrap.dlm-admin-settings #setting-dlm_downloads_path .dlm-install-plugin-actions{display:inline-block;vertical-align:middle;margin:5px auto;margin-left:15px}#total_downloads_browser_table a.nav-tab{text-transform:capitalize}#dlm-amazon-s3-upsell .inside,#dlm-buttons-upsell .inside,#dlm-download-page-upsell .inside,#dlm-google-drive-upsell .inside{display:flex;flex-wrap:wrap;background:#f1f1f1}#dlm-amazon-s3-upsell .inside .wpchill-upsell,#dlm-buttons-upsell .inside .wpchill-upsell,#dlm-download-page-upsell .inside .wpchill-upsell,#dlm-google-drive-upsell .inside .wpchill-upsell{background:#fff;text-align:center;width:100%;margin-top:0}#dlm-amazon-s3-upsell .inside,#dlm-buttons-upsell .inside,#dlm-download-page-upsell .inside,#dlm-google-drive-upsell .inside{margin:0;padding:0}.upsells-columns .dlm-available-with-pro,.wpchill-upsells-wrapper .dlm-available-with-pro{width:auto;border-radius:0 5px 0 5px;background:#2271b1;color:#fff;position:absolute;top:-1px;right:-1px;display:flex;align-content:center;border-top:0;border-left:0;padding:5px 8px 2px 5px}.upsells-columns .dlm-available-with-pro>*,.wpchill-upsells-wrapper .dlm-available-with-pro>*{font-size:12px}.upsells-columns .dlm-available-with-pro>.dashicons,.wpchill-upsells-wrapper .dlm-available-with-pro>.dashicons{line-height:15px}.upsells-columns{display:flex;flex-wrap:wrap;align-items:center;align-content:center;padding-top:5px;margin-bottom:10px}.upsells-columns .upsells-columns-2{width:50%;text-align:center;display:flex;align-items:center;align-content:center}.upsells-columns .upsells-column{width:calc(100% - 30px);text-align:center;display:flex;align-items:center;align-content:center;margin:5px auto 0 auto;border-radius:5px;border:1px solid #cecece;overflow:hidden}.upsells-columns .upsells-column .dashicons-amazon{font-size:22px}.upsells-columns .upsells-column .dashicons-google{font-size:18px;position:relative;left:1px;top:1px}.upsells-columns .upsells-column .dashicons-lock:before{font-size:14px}.upsells-columns .upsells-column>*{display:inline-block;align-content:center;vertical-align:middle;margin:0 10px;padding:7px 0}.upsells-columns .upsells-column>.wpchill-upsell{position:relative;float:none;flex-grow:1;display:flex;align-items:center;margin:0}.upsells-columns .upsells-column>.wpchill-upsell .wpchill-upsell-description{margin:0;text-align:left;max-width:535px;font-size:12px}.upsells-columns .upsells-column h3{line-height:1.3em;font-size:1em;margin-left:0}.upsells-columns .upsells-column:last-child{border-top:1px solid #c3c4c7;border-bottom:1px solid #c3c4c7}.upsells-columns .wpchill-upsell{margin-top:0}.disabled-link{color:currentColor;cursor:not-allowed;opacity:.5;text-decoration:none}.text-right{text-align:right}.dlm_download_page_dlm-lite-vs-pro,.dlm_download_page_dlm-lite-vs-pro p{font-size:14px;margin:0}.dlm_download_page_dlm-lite-vs-pro>.wpchill-plans-table.wpchill-highlight>.wpchill-pricing-package{background:#fefff0;box-shadow:0 0 15px #d0dbdb}.dlm_download_page_dlm-lite-vs-pro .wp-badge{display:inline-block;vertical-align:middle;position:relative;margin-right:2.5%}.dlm_download_page_dlm-lite-vs-pro h3{display:block;position:relative;font-size:16px;margin:0}.dlm_download_page_dlm-lite-vs-pro .wpchill-plans-table{display:flex}.dlm_download_page_dlm-lite-vs-pro .wpchill-plans-table.table-header{margin-top:50px;border-top:0}.dlm_download_page_dlm-lite-vs-pro .wpchill-plans-table.table-header .wpchill-pricing-package{border:0}.dlm_download_page_dlm-lite-vs-pro .wpchill-plans-table.table-header .wpchill-pricing-package.wpchill-title.wpchill-highlight::before,.dlm_download_page_dlm-lite-vs-pro .wpchill-plans-table.table-header .wpchill-pricing-package:not(.wpchill-modula-lite):last-child:before{content:'';width:auto;display:inline-block;opacity:1;position:absolute;top:-1px;background:#41495b;text-align:center;left:0;right:0;color:#fff;font-size:15px;text-transform:uppercase;padding:10px 5px;transform:translateY(-100%)}.dlm_download_page_dlm-lite-vs-pro.table-footer .wpchill-pricing-package:last-child{border:0}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package{text-align:center;line-height:1.5;padding:10px 15px;display:flex;align-content:center;align-items:center;justify-content:center;background:#fff;border-top:1px solid #ccc;width:32%}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package:not(:first-child){max-width:300px}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title{font-weight:400;color:#666;font-size:1.25rem;height:auto;-ms-flex-direction:column;flex-direction:column;padding-top:30px;padding-bottom:30px;justify-content:space-between;position:relative}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title .wpchill-name{margin:0;font-size:36px}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title.wpchill-modula-lite{justify-content:center}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title p.description{font-style:italic;font-size:13px;margin-bottom:40px}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title .wpchill-price p:last-child{font-size:30px;margin:0 0 40px 0}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title .wpchill-price p.old-price{margin:0;position:relative}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title .wpchill-price p.old-price:after{content:"";height:2px;width:60px;background:red;display:block;position:absolute;left:50%;top:52%;transform:translate(-50%,-50%)}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title .wpchill-price sup{top:2px;position:relative;font-size:15px}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-empty{background:0 0;border-color:transparent}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.feature-name{justify-content:space-between;font-weight:400;text-align:left;font-size:13px;display:block;background:0 0}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package .dashicons-saved{color:green}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package .dashicons{width:30px;height:30px;font-size:30px}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package .dashicons-no-alt{color:#ff3439}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package:last-child{background:#fefff0}.dlm_download_page_dlm-lite-vs-pro .button .dashicons{font-size:16px;vertical-align:middle;line-height:26px}.wpchill-tooltip{position:relative;display:inline-block;margin-right:10px}.wpchill-tooltip>i{cursor:pointer;color:rgba(0,0,0,.6);margin-left:5px;font-style:normal}.wpchill-tooltip .wpchill-tooltip-content{display:none;position:absolute;top:50%;right:-10px;transform:translate(100%,-50%);width:300px;background:#000;color:#fff;padding:10px;box-sizing:border-box;z-index:99}.wpchill-tooltip .wpchill-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;top:50%;left:-8px;transform:translateY(-50%)}.wpchill-tooltip:hover .wpchill-tooltip-content{display:block}.dlm_download_page_dlm-extensions .theme.dlm_extension{background-color:#fff}.wpchill-tooltip{position:relative;display:inline-block;float:left;margin-right:10px}.wpchill-tooltip>span{cursor:pointer;color:#0073aa;text-decoration:underline;margin-left:5px}.wpchill-tooltip .wpchill-tooltip-content{display:none;position:absolute;top:50%;right:-10px;transform:translate(100%,-50%);width:300px;background:#000;color:#fff;padding:10px;box-sizing:border-box;z-index:99}.wpchill-tooltip:hover .wpchill-tooltip-content{display:block}.wpchill-tooltip .wpchill-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;top:50%;left:-8px;transform:translateY(-50%)}.wpchill-tooltip-button{position:relative}.wpchill-tooltip-button .wpchill-tooltip-content{display:none;position:absolute;top:50%;right:25px;transform:translate(50%,-135%);width:auto;background:rgba(0,0,0,.8);color:#fff;padding:10px 15px;box-sizing:border-box;font-size:14px;z-index:99}.wpchill-tooltip-button:hover .wpchill-tooltip-content{display:block}.wpchill-tooltip-button .wpchill-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;bottom:-12px;left:50%;transform:rotate(-90deg)}.dlm-file-link{display:block;margin-top:3px}.dlm-listing-no-file code{color:#b32d2e}.wpchill-toggle{position:relative;user-select:none;display:inline-block;vertical-align:middle}.wpchill-toggle .wpchill-toggle__items{box-sizing:border-box;display:inline-block;position:relative}.wpchill-toggle .wpchill-toggle__items>*{box-sizing:inherit}.wpchill-toggle .wpchill-toggle__items .wpchill-toggle__track{background-color:#fff;border:2px solid #6c7781;border-radius:9px;display:inline-block;height:18px;width:36px;vertical-align:top;transition:background .2s ease}.wpchill-toggle .wpchill-toggle__items .wpchill-toggle__thumb{background-color:#6c7781;border:5px solid #6c7781;border-radius:50%;display:block;height:10px;width:10px;position:absolute;left:4px;top:4px;transition:transform .2s ease;min-width:auto;min-height:auto;float:none;padding:0}.wpchill-toggle .wpchill-toggle__items .wpchill-toggle__off{position:absolute;right:6px;top:6px;color:#6c7781;fill:currentColor}.wpchill-toggle .wpchill-toggle__items .wpchill-toggle__on{position:absolute;top:6px;left:8px;border:1px solid #fff;outline:1px solid transparent;outline-offset:-1px;display:none}.wpchill-toggle .wpchill-toggle__input[type=checkbox]{border-radius:2px;border:2px solid #6c7781;margin-right:12px;transition:none;height:100%;left:0;top:0;margin:0;padding:0;opacity:0;position:absolute;width:100%;z-index:1}.wpchill-toggle .wpchill-toggle__input[type=checkbox]:checked+.wpchill-toggle__items .wpchill-toggle__track{background-color:#0081a7;border:9px solid transparent}.wpchill-toggle .wpchill-toggle__input[type=checkbox]:checked+.wpchill-toggle__items .wpchill-toggle__thumb{background-color:#fff;border-width:0;transform:translateX(18px)}.wpchill-toggle .wpchill-toggle__input[type=checkbox]:checked+.wpchill-toggle__items .wpchill-toggle__off{display:none}.wpchill-toggle .wpchill-toggle__input[type=checkbox]:checked+.wpchill-toggle__items .wpchill-toggle__on{display:inline-block}#total_downloads_table_wrapper2{width:100%;background-color:#fff;border:1px solid #e0e0e0;margin-top:30px;position:relative}#total_downloads_table_wrapper2 .total_downloads_table_header{padding:0 16px;height:70px;border-bottom:1px solid #e0e0e0;display:flex;justify-content:space-between;align-items:center}#total_downloads_table_wrapper2 .total_downloads_table_header .total_downloads_table_exportcsv .dashicons{margin-right:5px}#total_downloads_table_wrapper2 .total_downloads_table_header h3{margin:0;line-height:1.2;color:#23282d;font-size:16px;font-weight:600;text-transform:capitalize}@keyframes dlmRotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.dlm-uploader-editor{position:absolute;z-index:99998;background:rgba(140,143,148,.9);top:0;left:0;right:0;bottom:0;text-align:center;display:none}.dlm-uploader-editor.droppable{background:rgba(10,75,120,.9)}.dlm-uploader-editor .uploader-editor-content{position:absolute;top:10px;left:10px;right:10px;bottom:10px;border:1px dashed #fff}.dlm-uploader-editor .uploader-editor-content .uploader-editor-title{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);font-size:3em;line-height:1.3;font-weight:600;color:#fff;margin:0;padding:0 10px}.dlm-notice-logo{width:auto;max-height:35px;max-width:35px;display:inline-block}.dlm-available-with-pro__overlay{pointer-events:none;background:#fff!important;opacity:.5}.dlm-available-with-pro__overlay.select{margin-left:10px}.dlm-available-with-pro__label{pointer-events:none;background:#80808080;padding:1px 5px;border-radius:5px;display:inline-block;vertical-align:middle;font-size:10px;color:#fff}
1
+ .post-type-dlm_download .dlm-page-header{border-bottom:1px solid #ccc;padding:15px 60px;display:flex;justify-content:space-between;background:#fff;width:calc(100% + 20px);box-sizing:border-box;margin-left:-20px}.post-type-dlm_download .dlm-page-header .dlm-header-links{margin-left:-20px}.post-type-dlm_download .dlm-page-header .dlm-header-links a span{vertical-align:middle;position:relative;top:-2px;padding-right:10px;font-size:16px}.post-type-dlm_download .dlm-page-header .dlm-header-logo img{max-height:35px}.post-type-dlm_download td.column-shortcode .hidden{display:none}.post-type-dlm_download .inline-edit-row .inline-edit-col-dlm .inline-edit-col-dlm-inner{margin-top:10px}.dlm-settings-sub-nav{margin:0 0 10px 0;width:100%;border-bottom:1px solid #ccc;box-shadow:0 1px 1px rgba(0,0,0,.04)}.dlm-settings-sub-nav li{margin-right:10px;margin-bottom:-2px}.dlm-settings-sub-nav a{padding:13px;display:block;outline:0;box-shadow:none}.dlm-settings-sub-nav .active-section{margin-bottom:-2px}.dlm-settings-sub-nav .active-section a{border-bottom:4px solid #000;padding-bottom:9px;margin-bottom:-2px;font-weight:600}.dlm-admin-settings #setting-dlm_decimal_separator,.dlm-admin-settings #setting-dlm_thousand_separator{width:50px}.dlm-admin-settings table td{padding:15px 0}.dlm-admin-settings h3{margin:2em 0 0}.dlm-admin-settings .form-table label.dlm-radio-label{display:block;margin-bottom:5px}.dlm-admin-settings .form-table label.dlm-enhanced-radio-label{position:relative;padding:10px 15px;display:inline-block;margin-bottom:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dlm-admin-settings .form-table label.dlm-enhanced-radio-label span{z-index:3;position:relative}.dlm-admin-settings .form-table label.dlm-enhanced-radio-label input[type=radio]{position:relative;z-index:2}.dlm-admin-settings .form-table label.dlm-enhanced-radio-label input[type=radio]+div.dlm-radio__selectable-area{position:absolute;width:100%;height:100%;border-radius:20px;display:block;top:0;left:0;opacity:1;border:1px solid grey}.dlm-admin-settings .form-table label.dlm-enhanced-radio-label input[type=radio]:checked+div.dlm-radio__selectable-area{border-color:green;background-color:rgba(0,128,0,.6)}.dlm-admin-settings .form-table label.dlm-enhanced-radio-label input[type=radio]:checked+div.dlm-radio__selectable-area+span{color:#fff}.dlm-admin-settings .dlm_settings{padding:5px 0}.dlm-admin-settings .dlm_settings>th{padding:15px 5px}.dlm-admin-settings .dlm_settings>td{padding:15px 5px 15px 0}.dlm-admin-settings .dlm_install_plugin_setting{background:#fff;padding:0 15px;border-bottom:1px solid #ccc;border-top:1px solid #ccc}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group,.dlm-admin-settings .dlm_group_setting td{margin:0 auto;padding:0!important}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group .dlm-groupped-settings__box,.dlm-admin-settings .dlm_group_setting td .dlm-groupped-settings__box{margin:5px 0 5px 0}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group .dlm-groupped-settings__box .postbox,.dlm-admin-settings .dlm_group_setting td .dlm-groupped-settings__box .postbox{padding:0;margin:0 auto}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group .dlm-groupped-settings__box .postbox .hndle,.dlm-admin-settings .dlm_group_setting td .dlm-groupped-settings__box .postbox .hndle{margin:0;padding:8px;font-weight:lighter}.dlm-admin-settings .dlm_group_setting .handle-actions button{box-shadow:none}.dlm-admin-settings .dlm_group_setting h2.hndle{cursor:pointer}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group__content{padding:15px}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group__content .dlm-accordeon-group__setting{padding:35px 0;display:flex;flex-wrap:wrap;flex-direction:row;justify-content:space-between}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group__content .dlm-accordeon-group__setting .dlm-accordeon-group__setting-title{font-size:16px;margin-bottom:15px;font-weight:700;width:20%}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group__content .dlm-accordeon-group__setting .dlm-accordeon-group__setting-content{width:80%}.dlm-admin-settings .dlm_group_setting .dlm-accordeon-group__content .dlm-accordeon-group__setting .description{font-style:italic}ul.download_monitor_file_browser{list-style:none outside;margin:0;border:1px solid #ddd;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#f9f9f9;padding:5px 5px;-moz-box-shadow:inset 0 0 0 1px #fff;-webkit-box-shadow:inset 0 0 0 1px #fff;box-shadow:inset 0 0 0 1px #fff}ul.download_monitor_file_browser li{padding:0;margin:0}ul.download_monitor_file_browser li a{color:#21759b;display:block;padding:4px 0 4px 4px;text-decoration:none}ul.download_monitor_file_browser li a:hover{background-color:#eaf2fa}ul.download_monitor_file_browser li a:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f123";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.folder:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f318";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-3g2:before,ul.download_monitor_file_browser li a.filetype-3gp:before,ul.download_monitor_file_browser li a.filetype-asf:before,ul.download_monitor_file_browser li a.filetype-asx:before,ul.download_monitor_file_browser li a.filetype-avi:before,ul.download_monitor_file_browser li a.filetype-mov:before,ul.download_monitor_file_browser li a.filetype-mp4:before,ul.download_monitor_file_browser li a.filetype-mpg:before,ul.download_monitor_file_browser li a.filetype-rm:before,ul.download_monitor_file_browser li a.filetype-srt:before,ul.download_monitor_file_browser li a.filetype-vob:before,ul.download_monitor_file_browser li a.filetype-wmv:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f126";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-aif:before,ul.download_monitor_file_browser li a.filetype-iff:before,ul.download_monitor_file_browser li a.filetype-m3u:before,ul.download_monitor_file_browser li a.filetype-m4a:before,ul.download_monitor_file_browser li a.filetype-mid:before,ul.download_monitor_file_browser li a.filetype-midi:before,ul.download_monitor_file_browser li a.filetype-mp3:before,ul.download_monitor_file_browser li a.filetype-mpa:before,ul.download_monitor_file_browser li a.filetype-ra:before,ul.download_monitor_file_browser li a.filetype-wav:before,ul.download_monitor_file_browser li a.filetype-wma:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f127";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-ai:before,ul.download_monitor_file_browser li a.filetype-bmp:before,ul.download_monitor_file_browser li a.filetype-dds:before,ul.download_monitor_file_browser li a.filetype-eps:before,ul.download_monitor_file_browser li a.filetype-gif:before,ul.download_monitor_file_browser li a.filetype-ico:before,ul.download_monitor_file_browser li a.filetype-jpeg:before,ul.download_monitor_file_browser li a.filetype-jpg:before,ul.download_monitor_file_browser li a.filetype-png:before,ul.download_monitor_file_browser li a.filetype-ps:before,ul.download_monitor_file_browser li a.filetype-psd:before,ul.download_monitor_file_browser li a.filetype-pspimage:before,ul.download_monitor_file_browser li a.filetype-svg:before,ul.download_monitor_file_browser li a.filetype-tga:before,ul.download_monitor_file_browser li a.filetype-thm:before,ul.download_monitor_file_browser li a.filetype-tif:before,ul.download_monitor_file_browser li a.filetype-yuv:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f128";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li.nofiles{color:#999;font-style:italic;padding:4px 0}ul.download_monitor_file_browser li ul{list-style:none outside;margin:0;padding:0 0 0 28px}ul.download_monitor_file_browser li ul.loading{background:url(../images/ajax-loader.gif) no-repeat 24px 0;height:32px}table.wp-list-table .column-thumb{width:44px;text-align:center;white-space:nowrap}table.wp-list-table .column-dlm_download_cat,table.wp-list-table .column-dlm_download_tag,table.wp-list-table .column-file{width:11%!important}table.wp-list-table .column-file,table.wp-list-table .column-title{width:17%!important}table.wp-list-table .column-download_id,table.wp-list-table .column-version{width:5em}table.wp-list-table th.column-download_count span:first-child,table.wp-list-table th.column-featured span:first-child,table.wp-list-table th.column-locked_download span:first-child,table.wp-list-table th.column-members_only span:first-child,table.wp-list-table th.column-redirect_only span:first-child,table.wp-list-table th.column-thumb span:first-child{float:none;display:inline-block;width:1em;height:1em;line-height:1em;padding:2px 0 0 0;overflow:hidden}table.wp-list-table th.column-download_count .sorting-indicator,table.wp-list-table th.column-featured .sorting-indicator,table.wp-list-table th.column-locked_download .sorting-indicator,table.wp-list-table th.column-members_only .sorting-indicator,table.wp-list-table th.column-redirect_only .sorting-indicator,table.wp-list-table th.column-thumb .sorting-indicator{float:right}table.wp-list-table th.column-thumb{width:52px;text-align:center}table.wp-list-table th.column-thumb span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f128";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-download_count{width:5em}table.wp-list-table th.column-download_count span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f346";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-locked_download,table.wp-list-table th.column-members_only{width:3.5em}table.wp-list-table th.column-locked_download span:first-child:before,table.wp-list-table th.column-members_only span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f160";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-redirect_only{width:3.5em}table.wp-list-table th.column-redirect_only span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f103";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-featured{width:3.5em}table.wp-list-table th.column-featured span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f155";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table td.column-download_count,table.wp-list-table td.column-featured,table.wp-list-table td.column-locked_download,table.wp-list-table td.column-members_only,table.wp-list-table td.column-redirect_only{text-align:left;padding-left:11px}table.wp-list-table td.column-download_count span.na,table.wp-list-table td.column-featured span.na,table.wp-list-table td.column-locked_download span.na,table.wp-list-table td.column-members_only span.na,table.wp-list-table td.column-redirect_only span.na{color:#999;width:1em;height:1em;line-height:1em;display:inline-block;overflow:hidden;vertical-align:middle}table.wp-list-table td.column-download_count span.na:before,table.wp-list-table td.column-featured span.na:before,table.wp-list-table td.column-locked_download span.na:before,table.wp-list-table td.column-members_only span.na:before,table.wp-list-table td.column-redirect_only span.na:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table td.column-download_count span.yes,table.wp-list-table td.column-featured span.yes,table.wp-list-table td.column-locked_download span.yes,table.wp-list-table td.column-members_only span.yes,table.wp-list-table td.column-redirect_only span.yes{width:1em;height:1em;line-height:1em;display:inline-block;overflow:hidden;vertical-align:middle}table.wp-list-table td.column-download_count span.yes:before,table.wp-list-table td.column-featured span.yes:before,table.wp-list-table td.column-locked_download span.yes:before,table.wp-list-table td.column-members_only span.yes:before,table.wp-list-table td.column-redirect_only span.yes:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f147";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table .column-thumb img{padding:2px;margin:0;border:1px solid #dfdfdf;vertical-align:middle;width:32px;height:32px}#download-monitor-file .inside{padding:0;margin:0}#download-monitor-file .dlm-metaboxes-wrapper .close_all,#download-monitor-file .dlm-metaboxes-wrapper .expand_all{float:right;margin-left:1em;line-height:22px;text-decoration:none}#download-monitor-file .dlm-metaboxes-wrapper .expand_all:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f168";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .close_all:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper p.toolbar{margin:0!important;border-top:1px solid #fff;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-file .dlm-metaboxes-wrapper p.toolbar a.button{float:left;margin:0}#download-monitor-file .dlm-metaboxes-wrapper .fr,#download-monitor-file .dlm-metaboxes-wrapper button.add_attribute,#download-monitor-file .dlm-metaboxes-wrapper button.add_variable_attribute,#download-monitor-file .dlm-metaboxes-wrapper select.attribute_taxonomy{float:right;margin:0 0 0 6px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metaboxes{padding:0 12px 0}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metaboxes.dlm-versions-tab{display:flex;justify-content:space-between;flex-wrap:wrap;border-top:1px solid #dfdfdf}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin:9px 0;border-width:1px;border-style:dashed}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files{padding:0;margin:15px}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files .downloadable_file{background:#fff;border-radius:4px}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files .downloadable_file .dlm-version-info{display:inline-block}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files .downloadable_file .dlm-version-info>span{font-size:13px;font-weight:400;margin-right:20px}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files .downloadable_file .dlm-version-info>span:first-child{border:1px solid #ccc;padding:2px 3px;border-radius:5px}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files .downloadable_file .dlm-version-info>span .dashicons{margin-right:5px;color:#787C8250}#download-monitor-file .dlm-metaboxes-wrapper .downloadable_files .downloadable_file .dlm-version-info .dlm-version-info__version{background:rgba(206,206,206,.5);padding:3px 5px}#download-monitor-file .dlm-metaboxes-wrapper .drag-drop #drag-drop-area{border:4px dashed #c3c4c7;height:140px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox-content{padding-top:5px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row{width:calc(100% - 30px);position:relative;margin:10px 0;padding:0 15px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row>*,#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row>.dlm-file-version__file_present>*{width:100%}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row>.dlm-file-version__file_present>:not(.hidden,.dlm-uploader-editor),#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row>:not(.hidden,.dlm-uploader-editor){display:block}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row .dlm-file-version__flex{display:flex;flex-direction:row;justify-content:space-between;align-content:center;align-items:center}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row .dlm-file-version__flex *{display:inline-block;vertical-align:middle}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row .dlm-file-version__inline>*{display:inline-block;vertical-align:middle;margin-right:25px;margin-bottom:25px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row .dlm-file-version__date>*{display:inline-block;width:auto}#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__row .dlm-file-version__hashes{display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:25px}#download-monitor-file .dlm-metaboxes-wrapper #dlm-new-upload{padding:0 15px}#download-monitor-file .dlm-metaboxes-wrapper #dlm-new-upload,#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__uploader{position:relative}#download-monitor-file .dlm-metaboxes-wrapper #dlm-new-upload .drag-drop .drag-drop-inside,#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__uploader .drag-drop .drag-drop-inside{width:100%;margin-top:25px}#download-monitor-file .dlm-metaboxes-wrapper #dlm-new-upload .drag-drop .drag-drop-inside .dlm_browse_for_file,#download-monitor-file .dlm-metaboxes-wrapper .dlm-file-version__uploader .drag-drop .drag-drop-inside .dlm_browse_for_file{float:none}#download-monitor-file .dlm-metaboxes-wrapper .dlm-uploading-file{background:#f0f0f0;position:absolute;overflow:hidden;width:100%;height:100%;top:0;left:0;z-index:989}#download-monitor-file .dlm-metaboxes-wrapper .dlm-uploading-file:before{content:"";position:absolute;left:0;height:3px;width:100%;right:0;top:0;background:#d8d8d8}#download-monitor-file .dlm-metaboxes-wrapper .dlm-uploading-file label{text-align:center;padding:5px 0 7px 0;position:absolute;top:50%;transform:translateY(-50%);width:100%}#download-monitor-file .dlm-metaboxes-wrapper .dlm-uploading-file label.hidden{display:none}#download-monitor-file .dlm-metaboxes-wrapper .dlm-uploading-file label span{font-weight:700}#download-monitor-file .dlm-metaboxes-wrapper .dlm-uploading-file .dlm-uploading-progress-bar{background:#2271b1;height:3px;position:absolute;top:0}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox{border:1px solid #cecece;margin:10px 0!important;box-shadow:0 4px 6px rgba(0,0,0,.05)}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3{margin:0!important;padding:10px 10px 8px 10px!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:pointer;position:relative;border-bottom:1px solid #cecece}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3:before{content:"\f140";display:block;font:normal 22px/1 dashicons;speak:none;position:absolute;right:15px;color:#787c82}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3.opened:before{content:"\f142"}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 span.remove_file{float:right;margin-right:30px;color:#787C8250;transition-duration:.2s;position:relative}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 span.remove_file:hover{color:red}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 strong{line-height:30px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 select{font-family:sans-serif}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 .handlediv{background-position:6px 5px!important;display:none!important;height:24px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox:hover h3 .handlediv{display:block}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox .dlm-download-count-button{width:auto;min-width:50px;display:inline-block}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table{width:100%;position:relative;background:#fff;padding:3px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td{text-align:left;padding:6px 6px;vertical-align:top;border:0;line-height:26px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td label{text-align:left;display:block;line-height:21px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td .dlm-uploading-file label{text-align:center}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input{float:left;min-width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td textarea{width:100%;margin:0;display:block;font-size:14px;padding:4px;color:#555}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td textarea{height:7.5em}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td select{width:100%}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.short{width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.checkbox{width:auto;min-width:inherit;vertical-align:middle;display:inline;float:none}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.date-picker-field{width:50%;min-width:inherit;float:none;display:inline}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.hour,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.minute{width:2em;min-width:inherit;float:none;display:inline}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td.attribute_name{width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .minus,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .plus{margin-top:6px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .fl{float:left}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .fr{float:right}#download-monitor-file .dlm-metaboxes-wrapper .plus:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f132";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .minus:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_upload_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f317";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_media_library:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f104";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_browse_for_file{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm_browse_for_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f322";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_browse_for_file .dlm_browse_for_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f322";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_external_source:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f103";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-information .dlm_information_panel div p{overflow:hidden;width:100%;font-weight:700;box-sizing:border-box;line-height:28px;margin-bottom:5px}#download-monitor-information .dlm_information_panel input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1;width:calc(100% - 45px)}#download-monitor-product-information .dlm_information_panel div p{overflow:hidden;width:100%;font-weight:700;box-sizing:border-box;line-height:28px;margin-bottom:5px}#download-monitor-product-information .dlm_information_panel input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1;width:calc(100% - 45px)}#download-monitor-options .inside{padding:0;margin:0}#download-monitor-options .form-field-checkbox label{display:inline;padding:0 0 4px}#download-monitor-options .form-field-checkbox input{display:inline-block;width:auto;vertical-align:middle}#download-monitor-options .form-field-checkbox .dlm-description{padding:4px 0 0 0;display:block}#download-monitor-options .access_permissions{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-options .access_permissions h4{margin-bottom:.5em;margin:0 0 .5em}#download-monitor-options .access_permissions ul{background:#fff;border:1px solid #dfdfdf;height:110px;overflow:auto;padding:.5em .9em;margin:0}#download-monitor-options p{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-options p.not-active{opacity:.7}#download-monitor-options .options_upsell_link{color:unset;text-decoration:none}#download-monitor-options .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:5px;border-radius:10px}#download-monitor-options .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:5px;border-radius:10px}#insert-download{padding:20px 20px}#insert-download #drag-drop-area,#insert-download #insert-shortcode{margin:1em 0}#insert-download .error,#insert-download .updated{margin-left:0;margin-right:0}#insert-download h2{margin-top:0}#insert-download label{margin:0 0 .25em 0;display:block;font-size:1.1em}#insert-download span.description{display:block}#insert-download input.input{margin:0 0 .25em 0;display:block;width:100%;font-size:1.1em}#insert-download .add_link{float:right}#insert-download ul.page-numbers{overflow:hidden;zoom:1;margin:0 auto;padding:0;text-align:center}#insert-download ul.page-numbers li{display:inline-block;margin:0;list-style:none outside;line-height:1em}#insert-download ul.page-numbers li a,#insert-download ul.page-numbers li span{text-decoration:none;border:1px solid #ddd;-webkit-border-radius:4px;border-radius:4px;padding:8px;display:block}#insert-download ul.page-numbers li span{border-color:#eee}#insert-download legend{font-weight:700;display:block;margin:0 0 1em}#insert-download fieldset label{display:block;margin:0 0 .5em}.dlm-code-nginx-rules{display:block}.settings_panel .form-table td{padding-left:0}.settings_panel .dlm-lazy-select-loader{display:inline-block;vertical-align:middle;padding:0 0 0 3px}.settings_panel .dlm-lazy-select-loader img{display:inline-block;height:25px;width:25px;margin-top:1px}.dlm_download_page_download-monitor-reports{position:relative}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports{margin:40px;position:relative}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-spinner{position:absolute;top:0;left:0;width:100%;height:100%;background:#fff;z-index:9999;color:#000;text-align:center}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-spinner span{display:inline-block;width:80px;height:80px}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-spinner span::after{content:" ";display:block;width:64px;height:64px;margin:8px;border-radius:50%;border:6px solid #000;border-color:#000 transparent #000 transparent;animation:dlmRotate 1.2s linear infinite}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .reports-block{background-color:#fff;margin-top:25px;border:1px solid #e0e0e0;box-sizing:border-box}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .half-reports-block{width:calc(50% - 45px)}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-loading-data{display:flex;flex-flow:column;align-items:center;justify-content:center;align-content:center;position:absolute;top:0;text-align:center;width:100%;height:100%;background:#fff;max-width:100%;margin:0 auto;font-size:36px;z-index:30}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header{display:flex;justify-content:space-between;background-color:#fff;border:1px solid #ddd}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-heading{font-weight:700}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-page-actions{flex-wrap:wrap;justify-content:space-between;align-items:center;align-content:center;display:flex}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation{display:flex;flex-wrap:wrap;justify-content:flex-start;border-bottom:1px solid #e0e0e0;overflow:hidden;margin:0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation .dlm-insights-tab-navigation__element{width:33%;min-width:200px;height:100%;padding:24px;cursor:pointer;margin-bottom:0;background-color:#f8f9fa;border-top:4px solid;border-top-color:#f1f1f1;border-left:1px solid #e0e0e0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation .dlm-insights-tab-navigation__element:last-of-type{border-right:1px solid #e0e0e0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation .dlm-insights-tab-navigation__element.active{background-color:#fff;border-top-color:#3858e9}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation .dlm-insights-tab-navigation__element .dlm-insights-tab-navigation__label{display:block;width:100%;font-size:16px;font-weight:700}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-insights-navigation .dlm-insights-tab-navigation .dlm-insights-tab-navigation__element .dlm-insights-tab-navigation__description{display:block;width:100%;font-size:12px;font-style:italic;color:#646161}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions{flex-wrap:wrap;justify-content:space-between;align-items:center;align-content:center;display:flex}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-per-page{margin-left:10px;margin-right:15px}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions:hover{border-color:#4338ca}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions:focus{border-color:#4338ca;box-shadow:0 0 3px #4338ca}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-period,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions a.dlm-reports-header-chart-switcher{margin:0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector{display:flex;align-items:center;min-height:32px;position:relative;font-size:14px;padding:0 .5em 0 5px;user-select:none;cursor:pointer;margin:0 15px;transition:.8s ease-in;opacity:1;min-width:230px}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector.disabled{pointer-events:none;opacity:0;display:none}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector>label{font-size:12px;font-style:italic;top:-20px;display:block;width:100%;position:absolute}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm-reports-header-period{display:flex;align-content:center;align-items:center;border:1px solid #ccc;border-left:0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm-reports-header-period a,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm-reports-header-period a:hover{height:100%;border:0;background:#fff;box-shadow:none}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm-reports-header-period a.active,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm-reports-header-period a:hover.active{background:#ccc}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector #dlm_date_range_picker .date-picker-wrapper{background:#fff;border:0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm-arrow:before{font-family:dashicons!important;content:"\f140";font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;text-align:center;font-variant:normal;text-transform:none;font-size:1.6em;vertical-align:middle}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay{display:flex;width:auto;background:#fff;position:absolute;top:30px;right:0;z-index:10;overflow:hidden;border-radius:5px;box-shadow:0 0 3px rgba(0,0,0,.6)}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date{font-size:70%;margin-right:5px;float:left;z-index:11;padding:15px}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline{border:0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline .ui-state-highlight{background:#e6e6e6 url(../images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;color:#555;border:1px solid #d3d3d3}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline .ui-state-active{border:1px solid #aaa;background:#fff url(../images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline td,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline th{padding:0;margin:0;line-height:2em}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline td a,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_date .ui-datepicker-inline th a{text-align:center!important}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .dlm_rdrs_actions{width:70px;padding-left:10px;text-align:center;display:flex}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .footer{position:absolute;left:0;top:0;height:100%;padding-top:0;padding-bottom:0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .footer .shortcuts{border-right:1px solid rgba(0,0,0,.6);margin-top:0;margin-bottom:0;display:flex;flex-flow:column;justify-content:center;height:100%}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .footer .shortcuts a{text-align:left;padding:5px 40px 5px 10px;min-width:100px;color:#000;text-decoration:none}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-header .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .date-picker-wrapper .footer .shortcuts a:hover{color:#4338ca;background:rgba(204,204,204,.3)}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-chart-icon{display:block;padding-right:15px;color:#23282d}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports #dlm-toggle-settings{cursor:pointer;position:relative}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports #dlm-toggle-settings:before{color:#0081a7}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports #dlm-toggle-settings .dlm-toggle-settings__settings{width:300px;position:absolute;top:0;left:-335px;padding:15px;background:#fff;z-index:3;text-align:left;display:none}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports #dlm-toggle-settings .dlm-toggle-settings__settings.display{display:block}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports #dlm-toggle-settings .dlm-toggle-settings__settings>div{margin:15px 0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-tab-navigation__content{display:none;width:100%;flex-direction:row;justify-content:space-between;flex-wrap:wrap;position:relative}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-insights-tab-navigation__content.active{display:flex}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm_reports_loader{position:absolute;width:32px;height:32px;top:50%;left:50%;margin:-16px 0 0 -16px}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation{text-align:center;padding:7px 0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation>*{vertical-align:middle;display:inline-block}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation>span{color:grey}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation .dlm-reports-total-pages{margin-right:15px}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation button{border:0;color:#000;font-size:1rem;cursor:pointer;margin:0;box-shadow:transparent 0 0 0 0,transparent 0 0 0 0,rgba(0,0,0,.1) 0 1px 3px 0,rgba(0,0,0,.06) 0 1px 2px 0;background-color:#fff;width:24px;vertical-align:middle}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .downloads-block-navigation button[disabled]{opacity:.5;cursor:default}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block{position:relative;box-sizing:border-box;width:100%;overflow:hidden}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block .wpchill-tooltip i{color:inherit;opacity:.6}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block.dlm-reports-block-half{width:49%;margin-right:1%}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block.dlm-reports-block-half-right{width:49%;margin-left:1%}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block .dlm-reports-placeholder-no-data{display:inline-block;width:100%;font-size:1.5em;color:#b4b9be;font-style:italic;text-align:center}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul{width:100%}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li{position:relative}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li:not(:first-of-type){border-left:1px solid #e0e0e0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li:last-of-type{border-right:1px solid #e0e0e0}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li label,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li span{display:block;width:100%}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li span{font-size:18px;line-height:28px;font-weight:700}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li:first-child label,.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports .dlm-reports-block ul li:first-child span{border:none}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports-wrapper{width:100%}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports-block-summary ul{display:flex;flex-direction:row;justify-content:initial}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports-block-summary ul li{width:12.5%;padding:24px;margin:0;font-weight:600}.dlm_download_page_download-monitor-reports #wpcontent .dlm-reports-block-summary label{font-size:14px;line-height:20px;margin-bottom:16px;color:#757575;font-weight:400}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper{max-width:100%;background-color:#fff;padding:15px 24px;position:relative;border:1px solid #e0e0e0}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-reports-block-chart{width:100%;height:300px;margin-top:20px;background:#fff;overflow:hidden}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-reports-block-chart .chart-container h6{display:none}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-canvas-tooltip{border-radius:10px;color:#fff;background-color:#1f2937;opacity:1;pointer-events:none;position:absolute;transform:translate(-50%,0);transition:all .1s ease;padding:10px 15px;text-align:left;z-index:99}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-canvas-tooltip .dlm-reports-tooltip__downloads{font-size:18px;margin:0 auto;font-weight:700;position:relative;padding-left:15px}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-canvas-tooltip .dlm-reports-tooltip__downloads .dlm-reports-tooltip__downloads_pointer{width:5px;height:5px;display:inline-block;position:absolute;top:50%;transform:translateY(-50%);left:0}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-canvas-tooltip .dlm-reports-tooltip__info{font-size:12px;margin:0 auto}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-canvas-tooltip .dlm-reports-tooltip__date{font-size:13px;margin:0 auto;font-weight:600}.dlm_download_page_download-monitor-reports #wpcontent .total_downloads_chart-wrapper .dlm-reports-tooltip__line{height:calc(100% - 110px);width:0;background:0 0;z-index:1;position:absolute;top:65px!important;border:1px dashed #000}.dlm_download_page_download-monitor-reports #wpcontent #total_downloads_table_wrapper h3,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper h3{margin-top:0}.dlm_download_page_download-monitor-reports #wpcontent #total_downloads_table_wrapper.empty,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper.empty{display:none}.dlm_download_page_download-monitor-reports #wpcontent #total_downloads_table_wrapper #users_download_log,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper #users_download_log{margin-top:25px}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper{width:100%;margin-top:35px}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper #users_download_log{padding:0!important}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header{background:#f9fafb}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line{font-weight:700;display:table;width:100%;margin-bottom:17px;padding:1rem 10px}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header:not(:last-child),.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line:not(:last-child){border-bottom:1px solid #dedede}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header .dlm-reports-top-downloads__download_status,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line .dlm-reports-top-downloads__download_status{border-radius:10px;padding:10px;text-transform:capitalize}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header .dlm-reports-top-downloads__download_status.completed,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line .dlm-reports-top-downloads__download_status.completed{background:#adff2f60}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header .dlm-reports-top-downloads__download_status.redirected,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line .dlm-reports-top-downloads__download_status.redirected{background:#fffF0060}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header .dlm-reports-top-downloads__download_status.failed,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line .dlm-reports-top-downloads__download_status.failed{background:#ff000060}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header>div,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line>div{width:calc(15% - 3px);display:inline-block;text-align:left!important;flex-grow:unset!important}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header>div:last-child,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line>div:last-child{width:calc(10% - 2px);text-align:right!important}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header>div .dlm-user-reports .wpchill-tooltip,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line>div .dlm-user-reports .wpchill-tooltip{font-size:12px}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header>div .dlm-user-reports .wpchill-tooltip .wpchill-tooltip-content,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line>div .dlm-user-reports .wpchill-tooltip .wpchill-tooltip-content{font-size:16px;line-height:18px;text-align:center}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header>div .dlm-user-reports .wpchill-tooltip .wpchill-tooltip-content span,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line>div .dlm-user-reports .wpchill-tooltip .wpchill-tooltip-content span{font-size:16px;line-height:18px;text-align:center;display:block}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__header a,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .dlm-reports-top-downloads__line a{text-decoration:none}.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .user-downloads-filters .user-downloads-filters__filter,.dlm_download_page_download-monitor-reports #wpcontent #users_downloads_table_wrapper .user-downloads-filters .user-downloads-filters__heading{display:inline-block}.dlm_download_page_download-monitor-reports div[data-id=user_reports] #user_downloads_summary ul .wpchill-tooltip,.dlm_download_page_download-monitor-reports div[data-id=user_reports] #users_downloads_table_wrapper ul .wpchill-tooltip{font-size:14px}.dlm_download_page_download-monitor-reports div[data-id=user_reports] #user_downloads_summary ul .wpchill-tooltip .wpchill-tooltip-content,.dlm_download_page_download-monitor-reports div[data-id=user_reports] #users_downloads_table_wrapper ul .wpchill-tooltip .wpchill-tooltip-content{font-size:16px;line-height:18px;text-align:center}.dlm_download_page_download-monitor-reports div[data-id=user_reports] #user_downloads_summary ul .wpchill-tooltip .wpchill-tooltip-content span,.dlm_download_page_download-monitor-reports div[data-id=user_reports] #users_downloads_table_wrapper ul .wpchill-tooltip .wpchill-tooltip-content span{font-size:16px;line-height:18px;text-align:center;display:block}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__table{width:100%;border-collapse:collapse}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__filters{background-color:#f8f9fa;border-bottom:1px solid #e2e4e7}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__filters>th{padding:16px;font-weight:700;text-align:left}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__header{font-weight:700;width:100%;margin-bottom:17px}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__header .dlm-reports-header-left,.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__header .dlm-reports-header-right{margin-bottom:15px;font-size:12px;color:#6b7280}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__header .dlm-reports-header-left{padding-left:36px}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__header .dlm-reports-header-right{text-align:right}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__line{background-color:#fff;border-bottom:1px solid #e2e4e7}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__line:hover{background-color:#e0e0e0;cursor:pointer}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__line>td{padding:16px;font-size:.8125rem;text-align:left;color:#192a3d;font-weight:500}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__line .dlm-reports-table__overflower{position:absolute;height:100%;background:#f5f5fc;z-index:-1}.dlm_download_page_download-monitor-reports .dlm-reports-table .dlm-reports-table__line a{color:#0081a7;padding:8px;display:block;font-weight:500}.dlm_download_page_download-monitor-reports input.dlm-reports-current-page{display:inline-block;width:75px;vertical-align:middle}.post-type-dlm_product table.wp-list-table .column-title{width:65%!important}.dlm_mb_shop_product_information .dlm_shop_field_row{width:100%;overflow:hidden}.dlm_mb_shop_product_information .dlm_shop_field_row label.dlm_shop_field_label{display:inline-block;width:20%;height:100%;line-height:2.2em;float:left}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input{display:inline-block;width:50%;float:left}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .dlm_shop_input{width:100%;padding:5px 7px}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-selection--multiple{border:1px solid #ddd}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-search,.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-selection__choice{margin-bottom:0}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-search__field{padding-top:3px}.dlm-order-overview #dlm_empty_trash{margin-left:3px}.dlm-order-overview .wp-list-table td .column-id{width:25%}.dlm-order-details{max-width:1250px;margin-left:auto;margin-right:auto;padding-right:20px}.dlm-order-details h1{padding-bottom:25px}.dlm-order-details .dlm-order-details-main,.dlm-order-details .dlm-order-details-side{width:100%;float:left}.dlm-order-details .dlm-order-details-block{padding:0;margin-bottom:20px;line-height:1;border:1px solid #e5e5e5;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.dlm-order-details .dlm-order-details-block h2.dlm-order-details-block-title{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;border-bottom:1px solid #eee}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside{margin:6px 0 0 0;padding:6px 12px 12px;line-height:1.4em;font-size:13px}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside label{display:block;font-weight:700;padding-bottom:6px}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside p{padding:0;margin:0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul,.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul li{list-style:none;padding:0;margin:0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul li{padding:6px 0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside .dlm-order-details-current-state{width:70%;height:30px}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer .dlm-order-details-customer-image{float:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer ul li{margin-bottom:4px;padding:0}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer ul li:first-child{font-weight:700}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items{overflow:hidden}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview{width:25%;float:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview td,.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview th{padding-top:1.5em;padding-bottom:1.5em;text-align:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview th{width:50%;font-weight:400}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview td{padding-right:1em;font-weight:700}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table{width:100%}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th{text-align:center}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td:first-child,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th:first-child{text-align:left;padding-left:.5em}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th{padding-top:.5em;padding-bottom:.5em;border-bottom:2px solid #c3c1bc}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td{padding-top:1.5em;padding-bottom:1.5em;border-bottom:1px solid #c3c1bc}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-details-order-items-item-total,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-details-order-items-item-total{text-align:right;padding-right:1em}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-transaction-processor-id,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-transaction-processor-id{display:none}.dlm-order-details .dlm-order-details-block .dlm-order-details-update-successful{font-size:2em;padding:.2em .3em;color:#46b450}@media (min-width:768px){.dlm-order-details .dlm-order-details-main{width:62%;float:left}.dlm-order-details .dlm-order-details-side{width:35%;float:right}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-transaction-processor-id,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-transaction-processor-id{display:table-cell}}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-one-col{margin:0 auto;max-width:800px}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-cta{margin-top:40px;text-align:center}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col{max-width:680px;margin:40px auto 0;overflow:hidden;display:flex;justify-content:space-between;flex-wrap:wrap}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col{padding-top:2.5em;flex:1;align-self:flex-start;min-width:100%;max-width:100%}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col img{width:100%}.dlm-onboarding .dlm-onboarding-section h2{margin:60px 0 .6em;font-size:2.7em;line-height:1.3;font-weight:300;text-align:center}.dlm-onboarding .dlm-onboarding-section p{max-width:55em;margin:.6em auto 0 auto}.dlm-onboarding .dlm-onboarding-section a.button-hero{height:46px;font-size:14px;line-height:44px;padding:0 36px;font-weight:700;text-align:center}.dlm-onboarding .dlm-onboarding-pages{max-width:55em;margin:0 auto;padding:2em 0 0}.dlm-onboarding .dlm-onboarding-pages a.button-hero{width:170px}.dlm-onboarding .dlm-onboarding-pages a.button-hero.dlm-page-exists{background:#46b450;border-color:#46b450 #4a8442 #467a3f;box-shadow:0 2px 0 #467a3f;text-shadow:0 -1px 1px #4a8442,1px 0 1px #4a8442,0 1px 1px #4a8442,-1px 0 1px #4a8442}.dlm-onboarding .dlm-onboarding-pages a.button-hero.dlm-page-exists:active{box-shadow:0 2px 0 #467a3f}.dlm-onboarding .dlm-onboarding-pages td,.dlm-onboarding .dlm-onboarding-pages th{padding:1em 0;border-bottom:1px solid #ccc}.dlm-onboarding .dlm-onboarding-pages th{width:13%;min-width:6em;text-align:left}.dlm-onboarding .dlm-onboarding-pages td{padding-right:.5em;padding-left:.5em}.dlm-onboarding .dlm-onboarding-pages td.dlm-onboarding-pages-page-title{font-weight:700}@media (min-width:768px){.dlm-onboarding .dlm-onboarding-section .dlm-onboarding-pages{width:55em}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col{padding-top:0;min-width:31%;max-width:31%}}.dlm_extensions_wrap a.dlm-reload-button{float:right;position:relative;top:-40px}.dlm_extensions_wrap #available-extensions{clear:both}.dlm_extensions_wrap .dlm_extensions{padding:15px 0;overflow:hidden}.dlm_extensions_wrap .dlm_extensions .dlm_extension{background-color:#fff;width:calc(20% - 15px);margin:0 15px 15px 0;display:inline-block;vertical-align:top}.dlm_extensions_wrap .dlm_extensions .dlm_extension p{margin:0}.dlm_extensions_wrap .dlm_extensions .dlm_extension a{color:#444;text-decoration:none}.dlm_extensions_wrap .dlm_extensions .dlm_extension .dlm_extension_img_wrapper{width:100%;background:#419ccb;text-align:center}.dlm_extensions_wrap .dlm_extensions .dlm_extension .dlm_extension_img_wrapper img{max-width:100%;margin:0 auto}.dlm_extensions_wrap .dlm_extensions .dlm_extension h3{min-height:40px;padding:0 20px}.dlm_extensions_wrap .dlm_extensions .dlm_extension div.extension-desc{min-height:120px;padding:0 20px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer{padding:15px 15px 15px 0;text-align:right;background-color:#fafafa;border-top:1px solid #dcdcde}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price{font-weight:700}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price.sale{color:green}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price.sale strike{color:#444}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .button .dashicons{vertical-align:middle;font-size:16px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license{padding:0 20px 20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license div.dlm_license_error{padding:.5em;margin-bottom:15px;background:#ffffe0}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license div.dlm_license_error a{color:#00f;text-decoration:underline}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license p.license-status{padding:5px 0;margin:5px 0;background:red;font-weight:700;font-size:1.2em;color:#fff;text-align:center}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license p.license-status.active{background:green}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license input{width:100%;margin:7px 0;padding:7px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license a.button-primary{width:100%;margin:5px auto 0;color:#fff;text-align:center}#ui-datepicker-div{display:none}.wpchill-upsell{background:#fff;padding:15px;margin-top:30px;position:relative}.wpchill-upsell .wpchill-upsell-features{text-align:left;display:flex;flex-wrap:wrap;padding:20px 0}.wpchill-upsell .wpchill-upsell-features li{width:33%}.wpchill-upsell a:first-child{margin-right:10px}.wpchill-upsells-wrapper{width:100%}.wpchill-upsells-wrapper .wpchill-upsell{border:1px solid #cecece;border-radius:5px;text-align:center}.wpchill-upsells-wrapper .wpchill-upsell img{max-width:100px;max-height:100px;height:auto;width:auto}.wrap.dlm-admin-settings .form-table{width:65%;float:left}.wrap.dlm-admin-settings .form-table+.wpchill-upsells-wrapper{width:30%;float:right}.wrap.dlm-admin-settings .form-table .dlm_htaccess_notice{margin-bottom:5px}.wrap.dlm-admin-settings .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:10px;border-radius:10px}.wrap.dlm-admin-settings #setting-dlm_downloads_path+p strong{color:red}.wrap.dlm-admin-settings #setting-dlm_downloads_path .dlm-install-plugin-actions{display:inline-block;vertical-align:middle;margin:5px auto;margin-left:15px}#total_downloads_browser_table a.nav-tab{text-transform:capitalize}#dlm-amazon-s3-upsell .inside,#dlm-buttons-upsell .inside,#dlm-download-page-upsell .inside,#dlm-google-drive-upsell .inside{display:flex;flex-wrap:wrap;background:#f1f1f1}#dlm-amazon-s3-upsell .inside .wpchill-upsell,#dlm-buttons-upsell .inside .wpchill-upsell,#dlm-download-page-upsell .inside .wpchill-upsell,#dlm-google-drive-upsell .inside .wpchill-upsell{background:#fff;text-align:center;width:100%;margin-top:0}#dlm-amazon-s3-upsell .inside,#dlm-buttons-upsell .inside,#dlm-download-page-upsell .inside,#dlm-google-drive-upsell .inside{margin:0;padding:0}.upsells-columns .dlm-available-with-pro,.wpchill-upsells-wrapper .dlm-available-with-pro{width:auto;border-radius:0 5px 0 5px;background:#2271b1;color:#fff;position:absolute;top:-1px;right:-1px;display:flex;align-content:center;border-top:0;border-left:0;padding:5px 8px 2px 5px}.upsells-columns .dlm-available-with-pro>*,.wpchill-upsells-wrapper .dlm-available-with-pro>*{font-size:12px}.upsells-columns .dlm-available-with-pro>.dashicons,.wpchill-upsells-wrapper .dlm-available-with-pro>.dashicons{line-height:15px}.upsells-columns{display:flex;flex-wrap:wrap;align-items:center;align-content:center;padding-top:5px;margin-bottom:10px}.upsells-columns .upsells-columns-2{width:50%;text-align:center;display:flex;align-items:center;align-content:center}.upsells-columns .upsells-column{width:calc(100% - 30px);text-align:center;display:flex;align-items:center;align-content:center;margin:5px auto 0 auto;border-radius:5px;border:1px solid #cecece;overflow:hidden}.upsells-columns .upsells-column .dashicons-amazon{font-size:22px}.upsells-columns .upsells-column .dashicons-google{font-size:18px;position:relative;left:1px;top:1px}.upsells-columns .upsells-column .dashicons-lock:before{font-size:14px}.upsells-columns .upsells-column>*{display:inline-block;align-content:center;vertical-align:middle;margin:0 10px;padding:7px 0}.upsells-columns .upsells-column>.wpchill-upsell{position:relative;float:none;flex-grow:1;display:flex;align-items:center;margin:0}.upsells-columns .upsells-column>.wpchill-upsell .wpchill-upsell-description{margin:0;text-align:left;max-width:535px;font-size:12px}.upsells-columns .upsells-column h3{line-height:1.3em;font-size:1em;margin-left:0}.upsells-columns .upsells-column:last-child{border-top:1px solid #c3c4c7;border-bottom:1px solid #c3c4c7}.upsells-columns .wpchill-upsell{margin-top:0}.disabled-link{color:currentColor;cursor:not-allowed;opacity:.5;text-decoration:none}.text-right{text-align:right}.dlm_download_page_dlm-lite-vs-pro,.dlm_download_page_dlm-lite-vs-pro p{font-size:14px;margin:0}.dlm_download_page_dlm-lite-vs-pro>.wpchill-plans-table.wpchill-highlight>.wpchill-pricing-package{background:#fefff0;box-shadow:0 0 15px #d0dbdb}.dlm_download_page_dlm-lite-vs-pro .wp-badge{display:inline-block;vertical-align:middle;position:relative;margin-right:2.5%}.dlm_download_page_dlm-lite-vs-pro h3{display:block;position:relative;font-size:16px;margin:0}.dlm_download_page_dlm-lite-vs-pro .wpchill-plans-table{display:flex}.dlm_download_page_dlm-lite-vs-pro .wpchill-plans-table.table-header{margin-top:50px;border-top:0}.dlm_download_page_dlm-lite-vs-pro .wpchill-plans-table.table-header .wpchill-pricing-package{border:0}.dlm_download_page_dlm-lite-vs-pro .wpchill-plans-table.table-header .wpchill-pricing-package.wpchill-title.wpchill-highlight::before,.dlm_download_page_dlm-lite-vs-pro .wpchill-plans-table.table-header .wpchill-pricing-package:not(.wpchill-modula-lite):last-child:before{content:'';width:auto;display:inline-block;opacity:1;position:absolute;top:-1px;background:#41495b;text-align:center;left:0;right:0;color:#fff;font-size:15px;text-transform:uppercase;padding:10px 5px;transform:translateY(-100%)}.dlm_download_page_dlm-lite-vs-pro.table-footer .wpchill-pricing-package:last-child{border:0}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package{text-align:center;line-height:1.5;padding:10px 15px;display:flex;align-content:center;align-items:center;justify-content:center;background:#fff;border-top:1px solid #ccc;width:32%}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package:not(:first-child){max-width:300px}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title{font-weight:400;color:#666;font-size:1.25rem;height:auto;-ms-flex-direction:column;flex-direction:column;padding-top:30px;padding-bottom:30px;justify-content:space-between;position:relative}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title .wpchill-name{margin:0;font-size:36px}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title.wpchill-modula-lite{justify-content:center}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title p.description{font-style:italic;font-size:13px;margin-bottom:40px}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title .wpchill-price p:last-child{font-size:30px;margin:0 0 40px 0}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title .wpchill-price p.old-price{margin:0;position:relative}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title .wpchill-price p.old-price:after{content:"";height:2px;width:60px;background:red;display:block;position:absolute;left:50%;top:52%;transform:translate(-50%,-50%)}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-title .wpchill-price sup{top:2px;position:relative;font-size:15px}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.wpchill-empty{background:0 0;border-color:transparent}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package.feature-name{justify-content:space-between;font-weight:400;text-align:left;font-size:13px;display:block;background:0 0}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package .dashicons-saved{color:green}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package .dashicons{width:30px;height:30px;font-size:30px}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package .dashicons-no-alt{color:#ff3439}.dlm_download_page_dlm-lite-vs-pro .wpchill-pricing-package:last-child{background:#fefff0}.dlm_download_page_dlm-lite-vs-pro .button .dashicons{font-size:16px;vertical-align:middle;line-height:26px}.wpchill-tooltip{position:relative;display:inline-block;margin-right:10px}.wpchill-tooltip>i{cursor:pointer;color:rgba(0,0,0,.6);margin-left:5px;font-style:normal}.wpchill-tooltip .wpchill-tooltip-content{display:none;position:absolute;top:50%;right:-10px;transform:translate(100%,-50%);width:300px;background:#000;color:#fff;padding:10px;box-sizing:border-box;z-index:99}.wpchill-tooltip .wpchill-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;top:50%;left:-8px;transform:translateY(-50%)}.wpchill-tooltip:hover .wpchill-tooltip-content{display:block}.dlm_download_page_dlm-extensions .theme.dlm_extension{background-color:#fff}.wpchill-tooltip{position:relative;display:inline-block;float:left;margin-right:10px}.wpchill-tooltip>span{cursor:pointer;color:#0073aa;text-decoration:underline;margin-left:5px}.wpchill-tooltip .wpchill-tooltip-content{display:none;position:absolute;top:50%;right:-10px;transform:translate(100%,-50%);width:300px;background:#000;color:#fff;padding:10px;box-sizing:border-box;z-index:99}.wpchill-tooltip:hover .wpchill-tooltip-content{display:block}.wpchill-tooltip .wpchill-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;top:50%;left:-8px;transform:translateY(-50%)}.wpchill-tooltip-button{position:relative}.wpchill-tooltip-button .wpchill-tooltip-content{display:none;position:absolute;top:50%;right:25px;transform:translate(50%,-135%);width:auto;background:rgba(0,0,0,.8);color:#fff;padding:10px 15px;box-sizing:border-box;font-size:14px;z-index:99}.wpchill-tooltip-button:hover .wpchill-tooltip-content{display:block}.wpchill-tooltip-button .wpchill-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;bottom:-12px;left:50%;transform:rotate(-90deg)}.dlm-file-link{display:block;margin-top:3px}.dlm-listing-no-file code{color:#b32d2e}.wpchill-toggle{position:relative;user-select:none;display:inline-block;vertical-align:middle}.wpchill-toggle .wpchill-toggle__items{box-sizing:border-box;display:inline-block;position:relative}.wpchill-toggle .wpchill-toggle__items>*{box-sizing:inherit}.wpchill-toggle .wpchill-toggle__items .wpchill-toggle__track{background-color:#fff;border:2px solid #6c7781;border-radius:9px;display:inline-block;height:18px;width:36px;vertical-align:top;transition:background .2s ease}.wpchill-toggle .wpchill-toggle__items .wpchill-toggle__thumb{background-color:#6c7781;border:5px solid #6c7781;border-radius:50%;display:block;height:10px;width:10px;position:absolute;left:4px;top:4px;transition:transform .2s ease;min-width:auto;min-height:auto;float:none;padding:0}.wpchill-toggle .wpchill-toggle__items .wpchill-toggle__off{position:absolute;right:6px;top:6px;color:#6c7781;fill:currentColor}.wpchill-toggle .wpchill-toggle__items .wpchill-toggle__on{position:absolute;top:6px;left:8px;border:1px solid #fff;outline:1px solid transparent;outline-offset:-1px;display:none}.wpchill-toggle .wpchill-toggle__input[type=checkbox]{border-radius:2px;border:2px solid #6c7781;margin-right:12px;transition:none;height:100%;left:0;top:0;margin:0;padding:0;opacity:0;position:absolute;width:100%;z-index:1}.wpchill-toggle .wpchill-toggle__input[type=checkbox]:checked+.wpchill-toggle__items .wpchill-toggle__track{background-color:#0081a7;border:9px solid transparent}.wpchill-toggle .wpchill-toggle__input[type=checkbox]:checked+.wpchill-toggle__items .wpchill-toggle__thumb{background-color:#fff;border-width:0;transform:translateX(18px)}.wpchill-toggle .wpchill-toggle__input[type=checkbox]:checked+.wpchill-toggle__items .wpchill-toggle__off{display:none}.wpchill-toggle .wpchill-toggle__input[type=checkbox]:checked+.wpchill-toggle__items .wpchill-toggle__on{display:inline-block}#total_downloads_table_wrapper2{width:100%;background-color:#fff;border:1px solid #e0e0e0;margin-top:30px;position:relative}#total_downloads_table_wrapper2 .total_downloads_table_header{padding:0 16px;height:70px;border-bottom:1px solid #e0e0e0;display:flex;justify-content:space-between;align-items:center}#total_downloads_table_wrapper2 .total_downloads_table_header .total_downloads_table_exportcsv .dashicons{margin-right:5px}#total_downloads_table_wrapper2 .total_downloads_table_header h3{margin:0;line-height:1.2;color:#23282d;font-size:16px;font-weight:600;text-transform:capitalize}@keyframes dlmRotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.dlm-uploader-editor{position:absolute;z-index:99998;background:rgba(140,143,148,.9);top:0;left:0;right:0;bottom:0;text-align:center;display:none}.dlm-uploader-editor.droppable{background:rgba(10,75,120,.9)}.dlm-uploader-editor .uploader-editor-content{position:absolute;top:10px;left:10px;right:10px;bottom:10px;border:1px dashed #fff}.dlm-uploader-editor .uploader-editor-content .uploader-editor-title{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);font-size:3em;line-height:1.3;font-weight:600;color:#fff;margin:0;padding:0 10px}.dlm-notice-logo{width:auto;max-height:35px;max-width:35px;display:inline-block}.dlm-available-with-pro__overlay{pointer-events:none;background:#fff!important;opacity:.5}.dlm-available-with-pro__overlay.select{margin-left:10px}.dlm-available-with-pro__label{pointer-events:none;background:#80808080;padding:1px 5px;border-radius:5px;display:inline-block;vertical-align:middle;font-size:10px;color:#fff}
assets/js/dlm-xhr.js CHANGED
@@ -22,6 +22,7 @@ class DLM_XHR_Download {
22
  // Create the classes that we will target
23
  let xhr_links = '';
24
  let $i = '';
 
25
  jQuery.each(dlmXHR.xhr_links.class, function ($key, $value) {
26
  if ($value.indexOf('[class') > -1 || $value.indexOf('[id') > -1) {
27
  xhr_links += $i + ' ' + $value;
@@ -33,6 +34,9 @@ class DLM_XHR_Download {
33
  });
34
 
35
  jQuery('html, body').on('click', xhr_links, function (e) {
 
 
 
36
  dlmXHRinstance.handleDownloadClick(this, e);
37
  });
38
  }
@@ -75,10 +79,11 @@ class DLM_XHR_Download {
75
 
76
  // This will hold the file as a local object URL
77
  let _OBJECT_URL;
78
- const request = new XMLHttpRequest(),
79
- $setCookie = dlmXHR.prevent_duplicates;
 
80
  let buttonClass = buttonObj.attr('class');
81
- buttonClass = buttonClass.replace('dlm-download-started', '').replace('dlm-download-completed','');
82
 
83
  buttonObj.addClass('dlm-download-started');
84
  button.setAttribute('href', '#');
@@ -122,13 +127,19 @@ class DLM_XHR_Download {
122
  if (request.readyState == 2 && 'undefined' !== typeof responseHeaders['dlm-error'] && '' !== responseHeaders['dlm-error'] && null !== responseHeaders['dlm-error']) {
123
 
124
  dlmXHRinstance.dlmLogDownload(responseHeaders['dlm-download-id'], responseHeaders['dlm-version-id'], 'failed', false);
 
 
 
125
  request.abort();
126
  buttonObj.append('<span class="dlm-xhr-error">' + responseHeaders['dlm-error'] + '</span>');
127
  return;
128
  }
129
 
130
  if (request.readyState == 2 && 'undefined' !== typeof responseHeaders['dlm-redirect'] && '' !== responseHeaders['dlm-redirect'] && null !== responseHeaders['dlm-redirect']) {
131
- dlmXHRinstance.dlmLogDownload(responseHeaders['dlm-download-id'], responseHeaders['dlm-version-id'], 'redirected', false, responseHeaders['dlm-redirect'], responseHeaders['dlm-no-access']);
 
 
 
132
  request.abort();
133
  return;
134
  }
@@ -208,6 +219,10 @@ class DLM_XHR_Download {
208
  });
209
 
210
  request.onerror = function () {
 
 
 
 
211
  console.log('** An error occurred during the transaction');
212
  };
213
 
@@ -216,7 +231,7 @@ class DLM_XHR_Download {
216
  request.send();
217
  }
218
 
219
- dlmLogDownload(download_id, version_id, status, cookie, redirect_path = null, no_access = null) {
220
 
221
  if (null !== no_access) {
222
  window.location.href = redirect_path;
@@ -237,17 +252,22 @@ class DLM_XHR_Download {
237
 
238
  jQuery.post(dlmXHR.ajaxUrl, data, function (response) {
239
  if (null !== redirect_path) {
240
- window.location.href = redirect_path;
 
 
 
 
241
  }
242
  });
243
  }
244
 
245
  dlmExternalDownload(headers, button, buttonObj, file_name, href) {
246
- const request = new XMLHttpRequest(),
247
- uri = headers['dlm-external-download'];
 
248
  let buttonClass = buttonObj.attr('class'),
249
  _OBJECT_URL;
250
- buttonClass = buttonClass.replace('dlm-download-started', '').replace('dlm-download-completed','');
251
 
252
  buttonObj.addClass('dlm-download-started');
253
  button.setAttribute('href', '#');
@@ -332,6 +352,10 @@ class DLM_XHR_Download {
332
  });
333
 
334
  request.onerror = function () {
 
 
 
 
335
  console.log('** An error occurred during the transaction');
336
  };
337
 
22
  // Create the classes that we will target
23
  let xhr_links = '';
24
  let $i = '';
25
+
26
  jQuery.each(dlmXHR.xhr_links.class, function ($key, $value) {
27
  if ($value.indexOf('[class') > -1 || $value.indexOf('[id') > -1) {
28
  xhr_links += $i + ' ' + $value;
34
  });
35
 
36
  jQuery('html, body').on('click', xhr_links, function (e) {
37
+ if (jQuery(this).hasClass('dlm-no-xhr-download')) {
38
+ return true;
39
+ }
40
  dlmXHRinstance.handleDownloadClick(this, e);
41
  });
42
  }
79
 
80
  // This will hold the file as a local object URL
81
  let _OBJECT_URL;
82
+ const request = new XMLHttpRequest(),
83
+ $setCookie = dlmXHR.prevent_duplicates,
84
+ buttonTarget = buttonObj.attr('target');
85
  let buttonClass = buttonObj.attr('class');
86
+ buttonClass = ('undefined' !== typeof buttonClass && '' !== buttonClass ) ? buttonClass.replace('dlm-download-started', '').replace('dlm-download-completed','') : '';
87
 
88
  buttonObj.addClass('dlm-download-started');
89
  button.setAttribute('href', '#');
127
  if (request.readyState == 2 && 'undefined' !== typeof responseHeaders['dlm-error'] && '' !== responseHeaders['dlm-error'] && null !== responseHeaders['dlm-error']) {
128
 
129
  dlmXHRinstance.dlmLogDownload(responseHeaders['dlm-download-id'], responseHeaders['dlm-version-id'], 'failed', false);
130
+ button.removeAttribute('download');
131
+ button.setAttribute('href', href);
132
+ buttonObj.removeClass().addClass(buttonClass).find('span.dlm-xhr-progress').remove();
133
  request.abort();
134
  buttonObj.append('<span class="dlm-xhr-error">' + responseHeaders['dlm-error'] + '</span>');
135
  return;
136
  }
137
 
138
  if (request.readyState == 2 && 'undefined' !== typeof responseHeaders['dlm-redirect'] && '' !== responseHeaders['dlm-redirect'] && null !== responseHeaders['dlm-redirect']) {
139
+ dlmXHRinstance.dlmLogDownload(responseHeaders['dlm-download-id'], responseHeaders['dlm-version-id'], 'redirected', false, responseHeaders['dlm-redirect'], responseHeaders['dlm-no-access'], buttonTarget);
140
+ button.removeAttribute('download');
141
+ button.setAttribute('href', href);
142
+ buttonObj.removeClass().addClass(buttonClass).find('span.dlm-xhr-progress').remove();
143
  request.abort();
144
  return;
145
  }
219
  });
220
 
221
  request.onerror = function () {
222
+ button.removeAttribute('download');
223
+ button.setAttribute('href', href);
224
+ buttonObj.removeClass().addClass(buttonClass + ' dlm-no-xhr-download').find('span.dlm-xhr-progress').remove();
225
+ buttonObj.append('<span class="dlm-xhr-error">' + dlmXHRtranslations.error + '</span>');
226
  console.log('** An error occurred during the transaction');
227
  };
228
 
231
  request.send();
232
  }
233
 
234
+ dlmLogDownload(download_id, version_id, status, cookie, redirect_path = null, no_access = null, target = '_self') {
235
 
236
  if (null !== no_access) {
237
  window.location.href = redirect_path;
252
 
253
  jQuery.post(dlmXHR.ajaxUrl, data, function (response) {
254
  if (null !== redirect_path) {
255
+ // If the link has no target attribute, then open in the same window
256
+ if (null == target) {
257
+ target = '_self';
258
+ }
259
+ window.open(redirect_path, target);
260
  }
261
  });
262
  }
263
 
264
  dlmExternalDownload(headers, button, buttonObj, file_name, href) {
265
+ const request = new XMLHttpRequest(),
266
+ uri = headers['dlm-external-download'],
267
+ buttonTarget = buttonObj.attr('target');
268
  let buttonClass = buttonObj.attr('class'),
269
  _OBJECT_URL;
270
+ buttonClass = ('undefined' !== typeof buttonClass && '' !== buttonClass ) ? buttonClass.replace('dlm-download-started', '').replace('dlm-download-completed','') : '';
271
 
272
  buttonObj.addClass('dlm-download-started');
273
  button.setAttribute('href', '#');
352
  });
353
 
354
  request.onerror = function () {
355
+ button.removeAttribute('download');
356
+ button.setAttribute('href', href);
357
+ buttonObj.removeClass().addClass(buttonClass + ' .dlm-no-xhr-download').find('span.dlm-xhr-progress').remove();
358
+ buttonObj.append('<span class="dlm-xhr-error">' + dlmXHRtranslations.error + '</span>');
359
  console.log('** An error occurred during the transaction');
360
  };
361
 
assets/js/dlm-xhr.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){new DLM_XHR_Download});class DLM_XHR_Download{constructor(){(dlmXHRinstance=this).init()}init(){dlmXHRinstance.attachButtonEvent()}attachButtonEvent(){let d="",o="";jQuery.each(dlmXHR.xhr_links.class,function(e,t){-1<t.indexOf("[class")||-1<t.indexOf("[id")?d+=o+" "+t:d+=o+" ."+t,o=","}),jQuery("html, body").on("click",d,function(e){dlmXHRinstance.handleDownloadClick(this,e)})}handleDownloadClick(e,t){t.stopPropagation();var d=e.getAttribute("href");let o={button:e,href:d,buttonObj:jQuery(e)};-1===o.href.indexOf("blob:http")&&"#"!==o.href&&(t.preventDefault(),dlmXHRinstance.retrieveBlob(o))}retrieveBlob(e){let{button:l,href:r,buttonObj:a}=e,s;const i=new XMLHttpRequest,c=dlmXHR.prevent_duplicates;let m=a.attr("class");m=m.replace("dlm-download-started","").replace("dlm-download-completed",""),a.addClass("dlm-download-started"),l.setAttribute("href","#"),l.removeAttribute("download"),l.setAttribute("disabled","disabled");e=0<r.indexOf("?")?r+"&nonce="+dlmXHR.nonce:r+"?nonce="+dlmXHR.nonce;jQuery(document).trigger("dlm_download_triggered",[this,l,a,s]),i.responseType="blob",i.onreadystatechange=function(){var{status:e,readyState:t,statusText:d}=i;let o=i.getAllResponseHeaders().split("\r\n").reduce((e,t)=>{var[t,d]=t.split(": ");return e[t]=d,e},{});if(void 0!==o["dlm-no-waypoints"]&&(i.abort(),window.location.href=r),void 0!==o["dlm-external-download"])return i.abort(),n=o["dlm-file-name"].replace(/\"/g,"").replace(";",""),void dlmXHRinstance.dlmExternalDownload(o,l,a,n,r);if(2==i.readyState&&void 0!==o["dlm-error"]&&""!==o["dlm-error"]&&null!==o["dlm-error"])return dlmXHRinstance.dlmLogDownload(o["dlm-download-id"],o["dlm-version-id"],"failed",!1),i.abort(),void a.append('<span class="dlm-xhr-error">'+o["dlm-error"]+"</span>");if(2==i.readyState&&void 0!==o["dlm-redirect"]&&""!==o["dlm-redirect"]&&null!==o["dlm-redirect"])return dlmXHRinstance.dlmLogDownload(o["dlm-download-id"],o["dlm-version-id"],"redirected",!1,o["dlm-redirect"],o["dlm-no-access"]),void i.abort();if(2==i.readyState&&i.status,404==e&&2==t){let e=document.createElement("p");e.innerHTML=d,l.parentNode.appendChild(e)}if(401==e&&2==t&&(window.location.href=d),403==e&&2==t){let e=document.createElement("p");e.innerHTML=d,l.parentNode.appendChild(e)}if(200==e&&4==t){var n=i.response;let e=o["content-disposition"].split("filename=")[1];e=e.replace(/\"/g,"").replace(";",""),s=URL.createObjectURL(n),l.removeEventListener("click",dlmXHRinstance.handleDownloadClick),l.setAttribute("download",""+e),l.setAttribute("href",s),l.click(),a.removeClass().addClass(m+" dlm-download-complete"),dlmXHRinstance.attachButtonEvent(),jQuery(document).trigger("dlm_download_complete",[this,l,a,s]),dlmXHRinstance.dlmLogDownload(o["dlm-download-id"],o["dlm-version-id"],"completed",c),window.URL.revokeObjectURL(s),l.removeAttribute("download"),l.setAttribute("href",r),setTimeout(function(){a.removeClass().addClass(m).find("span.dlm-xhr-progress").remove()},4e3)}},i.addEventListener("progress",function(e){let t=e.loaded/e.total*100;t=t.toFixed(2);var d;a.find("span.dlm-xhr-progress").remove(),d="dlm-download-started download-"+10*Math.ceil(t/10),1/0!=t&&a.append('<span class="dlm-xhr-progress">&nbsp;'+t+"%</span>"),a.removeClass().addClass(m+" "+d),jQuery(document).trigger("dlm_download_progress",[this,l,a,s,e,t])}),i.onerror=function(){console.log("** An error occurred during the transaction")},i.open("GET",e,!0),i.setRequestHeader("dlm-xhr-request","dlm_XMLHttpRequest"),i.send()}dlmLogDownload(e,t,d,o,n=null,l=null){null!==l?window.location.href=n:(l={download_id:e,version_id:t,status:d,cookie:o,currentURL:window.location.href,action:"log_dlm_xhr_download",nonce:dlmXHR.nonce},jQuery.post(dlmXHR.ajaxUrl,l,function(e){null!==n&&(window.location.href=n)}))}dlmExternalDownload(d,o,n,l,r){const a=new XMLHttpRequest,e=d["dlm-external-download"];let s=n.attr("class"),i;s=s.replace("dlm-download-started","").replace("dlm-download-completed",""),n.addClass("dlm-download-started"),o.setAttribute("href","#"),o.removeAttribute("download"),o.setAttribute("disabled","disabled"),jQuery(document).trigger("dlm_download_triggered",[this,o,n,i]),a.responseType="blob",a.onreadystatechange=function(){var{status:e,readyState:t}=a;a.getAllResponseHeaders().split("\r\n").reduce((e,t)=>{var[t,d]=t.split(": ");return e[t]=d,e},{});if(403===e)return dlmXHRinstance.dlmLogDownload(d["dlm-download-id"],d["dlm-version-id"],"failed",!1),a.abort(),void n.append('<span class="dlm-xhr-error">Acces Denied to file.</span>');200==e&&4==t&&(e=a.response,i=URL.createObjectURL(e),o.removeEventListener("click",dlmXHRinstance.handleDownloadClick),o.setAttribute("download",""+l),o.setAttribute("href",i),o.click(),n.removeClass().addClass(s+" dlm-download-complete"),dlmXHRinstance.attachButtonEvent(),jQuery(document).trigger("dlm_download_complete",[this,o,n,i]),dlmXHRinstance.dlmLogDownload(d["dlm-download-id"],d["dlm-version-id"],"completed",!1),window.URL.revokeObjectURL(i),o.removeAttribute("download"),o.setAttribute("href",r),setTimeout(function(){n.removeClass().addClass(s).find("span.dlm-xhr-progress").remove()},1e3))},a.addEventListener("progress",function(e){let t=e.loaded/e.total*100;t=t.toFixed(2);var d;n.find("span.dlm-xhr-progress").remove(),d="dlm-download-started download-"+10*Math.ceil(t/10),1/0!=t&&n.append('<span class="dlm-xhr-progress">&nbsp;'+t+"%</span>"),n.removeClass().addClass(s+" "+d),jQuery(document).trigger("dlm_download_progress",[this,o,n,i,e,t])}),a.onerror=function(){console.log("** An error occurred during the transaction")},a.open("GET",e,!0),a.setRequestHeader("dlm-xhr-request","dlm_XMLHttpRequest"),a.send()}}
1
+ jQuery(function(e){new DLM_XHR_Download});class DLM_XHR_Download{constructor(){(dlmXHRinstance=this).init()}init(){dlmXHRinstance.attachButtonEvent()}attachButtonEvent(){let d="",o="";jQuery.each(dlmXHR.xhr_links.class,function(e,t){-1<t.indexOf("[class")||-1<t.indexOf("[id")?d+=o+" "+t:d+=o+" ."+t,o=","}),jQuery("html, body").on("click",d,function(e){if(jQuery(this).hasClass("dlm-no-xhr-download"))return!0;dlmXHRinstance.handleDownloadClick(this,e)})}handleDownloadClick(e,t){t.stopPropagation();var d=e.getAttribute("href");let o={button:e,href:d,buttonObj:jQuery(e)};-1===o.href.indexOf("blob:http")&&"#"!==o.href&&(t.preventDefault(),dlmXHRinstance.retrieveBlob(o))}retrieveBlob(e){let{button:n,href:l,buttonObj:a}=e,s;const i=new XMLHttpRequest,m=dlmXHR.prevent_duplicates,c=a.attr("target");let u=a.attr("class");u=void 0!==u&&""!==u?u.replace("dlm-download-started","").replace("dlm-download-completed",""):"",a.addClass("dlm-download-started"),n.setAttribute("href","#"),n.removeAttribute("download"),n.setAttribute("disabled","disabled");e=0<l.indexOf("?")?l+"&nonce="+dlmXHR.nonce:l+"?nonce="+dlmXHR.nonce;jQuery(document).trigger("dlm_download_triggered",[this,n,a,s]),i.responseType="blob",i.onreadystatechange=function(){var{status:e,readyState:t,statusText:d}=i;let o=i.getAllResponseHeaders().split("\r\n").reduce((e,t)=>{var[t,d]=t.split(": ");return e[t]=d,e},{});if(void 0!==o["dlm-no-waypoints"]&&(i.abort(),window.location.href=l),void 0!==o["dlm-external-download"])return i.abort(),r=o["dlm-file-name"].replace(/\"/g,"").replace(";",""),void dlmXHRinstance.dlmExternalDownload(o,n,a,r,l);if(2==i.readyState&&void 0!==o["dlm-error"]&&""!==o["dlm-error"]&&null!==o["dlm-error"])return dlmXHRinstance.dlmLogDownload(o["dlm-download-id"],o["dlm-version-id"],"failed",!1),n.removeAttribute("download"),n.setAttribute("href",l),a.removeClass().addClass(u).find("span.dlm-xhr-progress").remove(),i.abort(),void a.append('<span class="dlm-xhr-error">'+o["dlm-error"]+"</span>");if(2==i.readyState&&void 0!==o["dlm-redirect"]&&""!==o["dlm-redirect"]&&null!==o["dlm-redirect"])return dlmXHRinstance.dlmLogDownload(o["dlm-download-id"],o["dlm-version-id"],"redirected",!1,o["dlm-redirect"],o["dlm-no-access"],c),n.removeAttribute("download"),n.setAttribute("href",l),a.removeClass().addClass(u).find("span.dlm-xhr-progress").remove(),void i.abort();if(2==i.readyState&&i.status,404==e&&2==t){let e=document.createElement("p");e.innerHTML=d,n.parentNode.appendChild(e)}if(401==e&&2==t&&(window.location.href=d),403==e&&2==t){let e=document.createElement("p");e.innerHTML=d,n.parentNode.appendChild(e)}if(200==e&&4==t){var r=i.response;let e=o["content-disposition"].split("filename=")[1];e=e.replace(/\"/g,"").replace(";",""),s=URL.createObjectURL(r),n.removeEventListener("click",dlmXHRinstance.handleDownloadClick),n.setAttribute("download",""+e),n.setAttribute("href",s),n.click(),a.removeClass().addClass(u+" dlm-download-complete"),dlmXHRinstance.attachButtonEvent(),jQuery(document).trigger("dlm_download_complete",[this,n,a,s]),dlmXHRinstance.dlmLogDownload(o["dlm-download-id"],o["dlm-version-id"],"completed",m),window.URL.revokeObjectURL(s),n.removeAttribute("download"),n.setAttribute("href",l),setTimeout(function(){a.removeClass().addClass(u).find("span.dlm-xhr-progress").remove()},4e3)}},i.addEventListener("progress",function(e){let t=e.loaded/e.total*100;t=t.toFixed(2);var d;a.find("span.dlm-xhr-progress").remove(),d="dlm-download-started download-"+10*Math.ceil(t/10),1/0!=t&&a.append('<span class="dlm-xhr-progress">&nbsp;'+t+"%</span>"),a.removeClass().addClass(u+" "+d),jQuery(document).trigger("dlm_download_progress",[this,n,a,s,e,t])}),i.onerror=function(){n.removeAttribute("download"),n.setAttribute("href",l),a.removeClass().addClass(u+" dlm-no-xhr-download").find("span.dlm-xhr-progress").remove(),a.append('<span class="dlm-xhr-error">'+dlmXHRtranslations.error+"</span>"),console.log("** An error occurred during the transaction")},i.open("GET",e,!0),i.setRequestHeader("dlm-xhr-request","dlm_XMLHttpRequest"),i.send()}dlmLogDownload(e,t,d,o,r=null,n=null,l="_self"){null!==n?window.location.href=r:(n={download_id:e,version_id:t,status:d,cookie:o,currentURL:window.location.href,action:"log_dlm_xhr_download",nonce:dlmXHR.nonce},jQuery.post(dlmXHR.ajaxUrl,n,function(e){null!==r&&(null==l&&(l="_self"),window.open(r,l))}))}dlmExternalDownload(d,o,r,n,l){const a=new XMLHttpRequest,e=d["dlm-external-download"];r.attr("target");let s=r.attr("class"),i;s=void 0!==s&&""!==s?s.replace("dlm-download-started","").replace("dlm-download-completed",""):"",r.addClass("dlm-download-started"),o.setAttribute("href","#"),o.removeAttribute("download"),o.setAttribute("disabled","disabled"),jQuery(document).trigger("dlm_download_triggered",[this,o,r,i]),a.responseType="blob",a.onreadystatechange=function(){var{status:e,readyState:t}=a;a.getAllResponseHeaders().split("\r\n").reduce((e,t)=>{var[t,d]=t.split(": ");return e[t]=d,e},{});if(403===e)return dlmXHRinstance.dlmLogDownload(d["dlm-download-id"],d["dlm-version-id"],"failed",!1),a.abort(),void r.append('<span class="dlm-xhr-error">Acces Denied to file.</span>');200==e&&4==t&&(e=a.response,i=URL.createObjectURL(e),o.removeEventListener("click",dlmXHRinstance.handleDownloadClick),o.setAttribute("download",""+n),o.setAttribute("href",i),o.click(),r.removeClass().addClass(s+" dlm-download-complete"),dlmXHRinstance.attachButtonEvent(),jQuery(document).trigger("dlm_download_complete",[this,o,r,i]),dlmXHRinstance.dlmLogDownload(d["dlm-download-id"],d["dlm-version-id"],"completed",!1),window.URL.revokeObjectURL(i),o.removeAttribute("download"),o.setAttribute("href",l),setTimeout(function(){r.removeClass().addClass(s).find("span.dlm-xhr-progress").remove()},1e3))},a.addEventListener("progress",function(e){let t=e.loaded/e.total*100;t=t.toFixed(2);var d;r.find("span.dlm-xhr-progress").remove(),d="dlm-download-started download-"+10*Math.ceil(t/10),1/0!=t&&r.append('<span class="dlm-xhr-progress">&nbsp;'+t+"%</span>"),r.removeClass().addClass(s+" "+d),jQuery(document).trigger("dlm_download_progress",[this,o,r,i,e,t])}),a.onerror=function(){o.removeAttribute("download"),o.setAttribute("href",l),r.removeClass().addClass(s+" .dlm-no-xhr-download").find("span.dlm-xhr-progress").remove(),r.append('<span class="dlm-xhr-error">'+dlmXHRtranslations.error+"</span>"),console.log("** An error occurred during the transaction")},a.open("GET",e,!0),a.setRequestHeader("dlm-xhr-request","dlm_XMLHttpRequest"),a.send()}}
assets/js/reports/reports.js CHANGED
@@ -24,6 +24,7 @@ class DLM_Reports {
24
  tempDownloads = null;
25
  templates = {};
26
  totalDownloads = 0;
 
27
 
28
  /**
29
  * The constructor for our class
@@ -1194,7 +1195,7 @@ class DLM_Reports {
1194
  return;
1195
  }
1196
 
1197
- const dataResponse = JSON.parse(JSON.stringify(dlmReportsInstance.mostDownloaded)).slice(10 * parseInt(offset), 10 * (parseInt(offset + 1)));
1198
 
1199
  for (let i = 0; i < dataResponse.length; i++) {
1200
 
@@ -1218,8 +1219,16 @@ class DLM_Reports {
1218
  }
1219
 
1220
  wrapper.parent().removeClass('empty');
 
 
1221
 
1222
- if (dlmReportsInstance.mostDownloaded.length > 10) {
 
 
 
 
 
 
1223
  wrapperParent.find('.downloads-block-navigation button').removeClass('hidden');
1224
  } else {
1225
  wrapperParent.find('.downloads-block-navigation button').addClass('hidden');
@@ -1258,6 +1267,10 @@ class DLM_Reports {
1258
 
1259
  dlmReportsInstance.handleSliderNavigation(handleObj)
1260
  });
 
 
 
 
1261
  }
1262
 
1263
  /**
@@ -1279,16 +1292,18 @@ class DLM_Reports {
1279
  doAction
1280
  } = {...handleObj};
1281
 
 
1282
  // Check if we click the next/load more button
1283
  if ('load-more' === link.data('action')) {
1284
 
1285
  offsetHolder.attr('data-page', nextPage);
1286
  doAction(nextPage);
1287
  // We remove the disable attribute only when there are pages to be shown
1288
- if (Math.ceil(data.length / 10) > nextPage + 1) {
1289
  nextButton.removeAttr('disabled');
1290
  }
1291
  prevButton.removeAttr('disabled');
 
1292
  } else {
1293
 
1294
  if (0 !== parseInt(offset)) {
@@ -1301,8 +1316,11 @@ class DLM_Reports {
1301
  prevButton.removeAttr('disabled');
1302
  }
1303
  nextButton.removeAttr('disabled');
 
1304
  }
1305
  }
 
 
1306
  }
1307
 
1308
  /**
@@ -1572,9 +1590,16 @@ class DLM_Reports {
1572
  */
1573
  getUserByID(user_id) {
1574
 
1575
- if (!user_id || '0' === user_id) {
1576
  return null;
1577
  }
 
 
 
 
 
 
 
1578
  let $user = Object.values(dlmReportsInstance.dlmUsersStats.users).filter(user => {
1579
  return parseInt(user_id) === parseInt(user.id);
1580
  });
@@ -1683,9 +1708,9 @@ class DLM_Reports {
1683
  let dataResponse = [];
1684
 
1685
  if (null !== dlmReportsInstance.tempDownloads) {
1686
- dataResponse = JSON.parse(JSON.stringify(dlmReportsInstance.tempDownloads)).slice(10 * parseInt(offset), 10 * (parseInt(offset + 1)));
1687
  } else {
1688
- dataResponse = JSON.parse(JSON.stringify(dlmReportsInstance.userDownloads)).slice(10 * parseInt(offset), 10 * (parseInt(offset + 1)));
1689
  }
1690
 
1691
  for (let i = 0; i < dataResponse.length; i++) {
@@ -1694,12 +1719,12 @@ class DLM_Reports {
1694
 
1695
  let itemObject = {
1696
  key : i,
1697
- user : ('0' !== dataResponse[i].user_id && 'undefined' !== typeof user && null !== user) ? user['display_name'] : '--',
1698
  ip : dataResponse[i].user_ip,
1699
  role : (null !== user && null !== user.role ? user.role : '--'),
1700
  download : ('undefined' !== typeof download) ? download.title : '--',
1701
  valid_user : ('0' !== dataResponse[i].user_id),
1702
- edit_link : 'user-edit.php?user_id=' + dataResponse[i].user_id,
1703
  edit_download_link: ('undefined' !== typeof download) ? dlmAdminUrl + 'post.php?post=' + download.id + '&action=edit' : '#',
1704
  status : dataResponse[i].download_status,
1705
  download_date : dataResponse[i].download_date,
@@ -1711,14 +1736,16 @@ class DLM_Reports {
1711
  }
1712
 
1713
  dlmReportsInstance.stopSpinner(jQuery('#users_download_log'));
 
 
1714
 
1715
- if (10 !== dataResponse.length) {
1716
  wrapperParent.find('.user-downloads-block-navigation button[data-action="load-more"]').attr('disabled', 'disabled');
1717
  } else {
1718
  wrapperParent.find('.user-downloads-block-navigation button[data-action="load-more"]').removeAttr('disabled');
1719
  }
1720
 
1721
- if (dlmReportsInstance.userDownloads.length > 10) {
1722
  wrapperParent.find('.user-downloads-block-navigation button').removeClass('hidden');
1723
  } else {
1724
  wrapperParent.find('.user-downloads-block-navigation button').addClass('hidden');
@@ -1776,7 +1803,11 @@ class DLM_Reports {
1776
  doAction: dlmReportsInstance.setUserDownloads
1777
 
1778
  }
1779
- dlmReportsInstance.handleSliderNavigation(handleObj)
 
 
 
 
1780
  });
1781
  }
1782
 
@@ -1989,6 +2020,22 @@ class DLM_Reports {
1989
  jQuery(this).parent().find('span.dashicons').toggleClass('dashicons-arrow-down dashicons-arrow-up');
1990
  dlmReportsInstance.orderUserReportsItemsByDate();
1991
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1992
  }
1993
  /**
1994
  * Set order of items
@@ -2028,4 +2075,49 @@ class DLM_Reports {
2028
  dlmReportsInstance.tempDownloads = dlmReportsInstance.tempDownloads.reverse();
2029
  dlmReportsInstance.setUserDownloads();
2030
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2031
  }
24
  tempDownloads = null;
25
  templates = {};
26
  totalDownloads = 0;
27
+ perPage = dlmReportsPerPage;
28
 
29
  /**
30
  * The constructor for our class
1195
  return;
1196
  }
1197
 
1198
+ const dataResponse = JSON.parse(JSON.stringify(dlmReportsInstance.mostDownloaded)).slice(dlmReportsInstance.perPage * parseInt(offset), dlmReportsInstance.perPage * (parseInt(offset + 1)));
1199
 
1200
  for (let i = 0; i < dataResponse.length; i++) {
1201
 
1219
  }
1220
 
1221
  wrapper.parent().removeClass('empty');
1222
+ // Set top downloads number of pages
1223
+ wrapperParent.find('.dlm-reports-total-pages').html(Math.ceil(dlmReportsInstance.mostDownloaded.length / dlmReportsInstance.perPage));
1224
 
1225
+ if (parseInt(dlmReportsInstance.perPage) !== parseInt(dataResponse.length)) {
1226
+ wrapperParent.find('.downloads-block-navigation button[data-action="load-more"]').attr('disabled', 'disabled');
1227
+ } else {
1228
+ wrapperParent.find('.downloads-block-navigation button[data-action="load-more"]').removeAttr('disabled');
1229
+ }
1230
+
1231
+ if (dlmReportsInstance.mostDownloaded.length > dlmReportsInstance.perPage) {
1232
  wrapperParent.find('.downloads-block-navigation button').removeClass('hidden');
1233
  } else {
1234
  wrapperParent.find('.downloads-block-navigation button').addClass('hidden');
1267
 
1268
  dlmReportsInstance.handleSliderNavigation(handleObj)
1269
  });
1270
+
1271
+ jQuery('#total_downloads_table_wrapper2').find('input.dlm-reports-current-page').on('change', function () {
1272
+ dlmReportsInstance.paginationChange(jQuery(this), dlmReportsInstance.mostDownloaded, jQuery('#total_downloads_table_wrapper2'), jQuery(this).parents('#total_downloads_table_wrapper2'), dlmReportsInstance.setTopDownloads);
1273
+ });
1274
  }
1275
 
1276
  /**
1292
  doAction
1293
  } = {...handleObj};
1294
 
1295
+ let page = 1;
1296
  // Check if we click the next/load more button
1297
  if ('load-more' === link.data('action')) {
1298
 
1299
  offsetHolder.attr('data-page', nextPage);
1300
  doAction(nextPage);
1301
  // We remove the disable attribute only when there are pages to be shown
1302
+ if (Math.ceil(data.length / dlmReportsInstance.perPage) > nextPage + 1) {
1303
  nextButton.removeAttr('disabled');
1304
  }
1305
  prevButton.removeAttr('disabled');
1306
+ page = parseInt(nextPage) + 1;
1307
  } else {
1308
 
1309
  if (0 !== parseInt(offset)) {
1316
  prevButton.removeAttr('disabled');
1317
  }
1318
  nextButton.removeAttr('disabled');
1319
+ page = parseInt(prevPage) + 1;
1320
  }
1321
  }
1322
+
1323
+ main_parent.find('.dlm-reports-current-page').val(page);
1324
  }
1325
 
1326
  /**
1590
  */
1591
  getUserByID(user_id) {
1592
 
1593
+ if (!user_id) {
1594
  return null;
1595
  }
1596
+ if ('0' === user_id) {
1597
+ return {
1598
+ role:'Guest',
1599
+ display_name:'Guest',
1600
+ };
1601
+ }
1602
+
1603
  let $user = Object.values(dlmReportsInstance.dlmUsersStats.users).filter(user => {
1604
  return parseInt(user_id) === parseInt(user.id);
1605
  });
1708
  let dataResponse = [];
1709
 
1710
  if (null !== dlmReportsInstance.tempDownloads) {
1711
+ dataResponse = JSON.parse(JSON.stringify(dlmReportsInstance.tempDownloads)).slice(dlmReportsInstance.perPage * parseInt(offset), dlmReportsInstance.perPage * (parseInt(offset + 1)));
1712
  } else {
1713
+ dataResponse = JSON.parse(JSON.stringify(dlmReportsInstance.userDownloads)).slice(dlmReportsInstance.perPage * parseInt(offset), dlmReportsInstance.perPage * (parseInt(offset + 1)));
1714
  }
1715
 
1716
  for (let i = 0; i < dataResponse.length; i++) {
1719
 
1720
  let itemObject = {
1721
  key : i,
1722
+ user : ('undefined' !== typeof user && null !== user) ? user['display_name'] : '--',
1723
  ip : dataResponse[i].user_ip,
1724
  role : (null !== user && null !== user.role ? user.role : '--'),
1725
  download : ('undefined' !== typeof download) ? download.title : '--',
1726
  valid_user : ('0' !== dataResponse[i].user_id),
1727
+ edit_link : ( '0' !== dataResponse[i].user_id) ? 'user-edit.php?user_id=' + dataResponse[i].user_id : '#',
1728
  edit_download_link: ('undefined' !== typeof download) ? dlmAdminUrl + 'post.php?post=' + download.id + '&action=edit' : '#',
1729
  status : dataResponse[i].download_status,
1730
  download_date : dataResponse[i].download_date,
1736
  }
1737
 
1738
  dlmReportsInstance.stopSpinner(jQuery('#users_download_log'));
1739
+ // Set the total number of downloads pages
1740
+ wrapperParent.find('.dlm-reports-total-pages').html(Math.ceil(dlmReportsInstance.tempDownloads.length / dlmReportsInstance.perPage));
1741
 
1742
+ if (parseInt(dlmReportsInstance.perPage) !== parseInt(dataResponse.length)) {
1743
  wrapperParent.find('.user-downloads-block-navigation button[data-action="load-more"]').attr('disabled', 'disabled');
1744
  } else {
1745
  wrapperParent.find('.user-downloads-block-navigation button[data-action="load-more"]').removeAttr('disabled');
1746
  }
1747
 
1748
+ if (dlmReportsInstance.userDownloads.length > dlmReportsInstance.perPage) {
1749
  wrapperParent.find('.user-downloads-block-navigation button').removeClass('hidden');
1750
  } else {
1751
  wrapperParent.find('.user-downloads-block-navigation button').addClass('hidden');
1803
  doAction: dlmReportsInstance.setUserDownloads
1804
 
1805
  }
1806
+ dlmReportsInstance.handleSliderNavigation(handleObj);
1807
+ });
1808
+
1809
+ jQuery('#users_downloads_table_wrapper').find('input.dlm-reports-current-page').on('change', function () {
1810
+ dlmReportsInstance.paginationChange(jQuery(this), dlmReportsInstance.tempDownloads, jQuery('#users_downloads_table_wrapper'), jQuery('#users_downloads_table_wrapper').find('#users_download_log'), dlmReportsInstance.setUserDownloads);
1811
  });
1812
  }
1813
 
2020
  jQuery(this).parent().find('span.dashicons').toggleClass('dashicons-arrow-down dashicons-arrow-up');
2021
  dlmReportsInstance.orderUserReportsItemsByDate();
2022
  });
2023
+
2024
+ jQuery('body').on('change', 'select.dlm-reports-per-page', function (e) {
2025
+ dlmReportsInstance.perPage = jQuery(this).val();
2026
+ dlmReportsInstance.setTopDownloads();
2027
+ dlmReportsInstance.setUserDownloads();
2028
+ jQuery.post(
2029
+ ajaxurl,
2030
+ {
2031
+ action : 'dlm_update_report_setting',
2032
+ name : 'dlm-reports-per-page',
2033
+ value : dlmReportsInstance.perPage,
2034
+ _ajax_nonce: dlmReportsNonce
2035
+ }, function (response) {
2036
+ }
2037
+ );
2038
+ });
2039
  }
2040
  /**
2041
  * Set order of items
2075
  dlmReportsInstance.tempDownloads = dlmReportsInstance.tempDownloads.reverse();
2076
  dlmReportsInstance.setUserDownloads();
2077
  }
2078
+
2079
+ /**
2080
+ * Pagination changing using the input type number
2081
+ *
2082
+ * @param input
2083
+ * @param data
2084
+ * @param main_parent
2085
+ * @param offsetHolder
2086
+ * @param action
2087
+ */
2088
+ paginationChange( input, data, main_parent, offsetHolder, action ){
2089
+
2090
+ let offset = parseInt(input.val());
2091
+
2092
+ if (0 === offset) {
2093
+ offset = 1;
2094
+ }
2095
+
2096
+ if (data.length < (offset * dlmReportsInstance.perPage)) {
2097
+ offset = Math.ceil(data.length / dlmReportsInstance.perPage);
2098
+ }
2099
+
2100
+ let link = jQuery(this).next('button[data-action="load-more"]'),
2101
+ nextPage = offset + 1,
2102
+ prevPage = offset - 1,
2103
+ prevButton = main_parent.find('.downloads-block-navigation button').first(),
2104
+ nextButton = main_parent.find('.downloads-block-navigation button').last();
2105
+
2106
+ link.attr('disabled', 'disabled');
2107
+
2108
+ const handleObj = {
2109
+ data : data,
2110
+ main_parent,
2111
+ offsetHolder,
2112
+ offset,
2113
+ link,
2114
+ nextPage,
2115
+ prevPage,
2116
+ prevButton,
2117
+ nextButton,
2118
+ doAction: action
2119
+ }
2120
+
2121
+ dlmReportsInstance.handleSliderNavigation(handleObj);
2122
+ }
2123
  }
assets/js/reports/reports.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){const t=new DLM_Reports;dlmReportsInstance.fetchReportsData(),e(document).on("dlm_downloads_report_fetched",function(){t.init()})});class DLM_Reports{dlmReportsStats=[];dlmUsersStats={logs:[],users:[]};currentFilters=[];tempDownloads=null;templates={};totalDownloads=0;constructor(){(dlmReportsInstance=this).chartContainer=document.getElementById("total_downloads_chart");const e=dlmReportsInstance.chartContainer.getContext("2d");dlmReportsInstance.chartColors={purple:{default:"rgba(149, 76, 233, 1)",threesome:"rgba(149, 76, 233, 0.75)",half:"rgba(149, 76, 233, 0.5)",quarter:"rgba(149, 76, 233, 0.5)",zero:"rgba(149, 76, 233, 0.05)"},blue:{default:"rgba(67, 56, 202, 1)",threesome:"rgba(67, 56, 202, 0.75)",half:"rgba(67, 56, 202, 0.5)",quarter:"rgba(67, 56, 202, 0.25)",zero:"rgba(67, 56, 202, 0.05)"},green:{default:"rgba(00, 255, 00, 1)",threesome:"rgba(00, 255, 00, 0.75)",half:"rgba(00, 255, 00, 0.5)",quarter:"rgba(00, 255, 00, 0.25)",zero:"rgba(67, 56, 202, 0.05)"},royalBlue:{default:"rgba(65, 105, 225, 1)",threesome:"rgba(65, 105, 225, 0.75)",half:"rgba(65, 105, 225, 0.5)",quarter:"rgba(65, 105, 225, 0.25)",zero:"rgba(65, 105, 225, 0.05)"},persianBlue:{default:"rgba(28, 57, 187, 1)",threesome:"rgba(28, 57, 187, 0.75)",half:"rgba(28, 57, 187, 0.5)",quarter:"rgba(28, 57, 187, 0.25)",zero:"rgba(28, 57, 187, 0.05)"},darkCyan:{default:"rgba(0,129,167, 1)",threesome:"rgba(0,129,167, 0.75)",half:"rgba(0,129,167, 0.5)",quarter:"rgba(0,129,167, 0.25)",zero:"rgba(0,129,167, 0.05)"},strongCyan:{default:"rgba(0, 175, 185, 1)",threesome:"rgba(0, 175, 185, 0.75)",half:"rgba(0, 175, 185, 0.5)",quarter:"rgba(0, 175, 185, 0.25)",zero:"rgba(0, 175, 185, 0.05)"}},dlmReportsInstance.chartGradient=e.createLinearGradient(0,25,0,300),dlmReportsInstance.chartGradient.addColorStop(0,dlmReportsInstance.chartColors.darkCyan.half),dlmReportsInstance.chartGradient.addColorStop(.45,dlmReportsInstance.chartColors.darkCyan.quarter),dlmReportsInstance.chartGradient.addColorStop(1,dlmReportsInstance.chartColors.darkCyan.zero),dlmReportsInstance.datePickerContainer=document.getElementById("dlm-date-range-picker"),dlmReportsInstance.dataSets=[];let t=new Date;dlmReportsInstance.dates={downloads:{start_date:new Date(t.setMonth(t.getMonth()-1)),end_date:new Date}},dlmReportsInstance.chartDataObject={}}async fetchReportsData(){const e=jQuery('div[data-id="general_info"]'),t=await fetch(dlmDownloadReportsAPI);if(!t.ok){const a=document.createElement("div"),n=(a.className="dlm-loading-data",document.createTextNode("Seems like we bumped into an error! ")),s=document.createTextNode("Data fetching returned a status text of : "+fetchedData.statusText),o=document.createElement("h1"),r=document.createElement("h3");throw o.appendChild(n),r.appendChild(s),a.appendChild(o),a.appendChild(r),e.find(".dlm-loading-data").remove(),e.append(a),new Error("Something went wrong! Reports response did not come OK - "+fetchedData.statusText)}dlmReportsInstance.dlmReportsStats=await t.json(),dlmReportsInstance.mostDownloaded=!1,dlmReportsInstance.stats=!1,dlmReportsInstance.chartType="day",0<window.location.href.indexOf("dlm_time")&&(dlmReportsInstance.dates.downloads.start_date=0<Object.keys(dlmReportsInstance.dlmReportsStats).length?new Date(dlmReportsInstance.dlmReportsStats[0].date):new Date,dlmReportsInstance.dates.downloads.end_date=new Date,jQuery("#dlm-date-range-picker .date-range-info").html(dlmReportsInstance.dates.downloads.start_date.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"2-digit"})+" - "+dlmReportsInstance.dates.downloads.end_date.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"2-digit"}))),dlmReportsInstance.createDataOnDate(dlmReportsInstance.dates.downloads.start_date,dlmReportsInstance.dates.downloads.end_date),dlmReportsInstance.datePicker={opened:!1},jQuery(document).trigger("dlm_downloads_report_fetched",[dlmReportsInstance,dlmReportsInstance.dlmReportsStats])}async fetchUsersReportsData(e=0,t=dlmPHPinfo.retrieved_rows){const a=jQuery('div[data-id="user_reports"]');let n=dlmUserReportsAPI+"?offset="+e+"&limit="+t;0<dlmUserReportsAPI.indexOf("index.php?")&&(n=dlmUserReportsAPI+"&offset="+e+"&limit="+t);const s=await fetch(n);if(!s.ok)throw new Error("Something went wrong! Reports response did not come OK - "+s.statusText);e=await s.json();dlmReportsInstance.dlmUsersStats.logs=dlmReportsInstance.dlmUsersStats.logs.concat(e.logs),!0===e.done?(dlmReportsInstance.userDownloads=void 0!==dlmReportsInstance.dlmUsersStats.logs?JSON.parse(JSON.stringify(dlmReportsInstance.dlmUsersStats.logs)):{},a.find(".dlm-loading-data").remove(),dlmReportsInstance.userReportsTab(),dlmReportsInstance.setTopDownloads(),dlmReportsInstance.stopSpinner(jQuery("#total_downloads_table_wrapper2"))):dlmReportsInstance.fetchUsersReportsData(e.offset)}async fetchUserData(){const e=await fetch(dlmUserDataAPI);if(!e.ok)throw new Error("Something went wrong! Reports response did not come OK - "+e.statusText);var t=await e.json();dlmReportsInstance.dlmUsersStats.users=dlmReportsInstance.dlmUsersStats.users.concat(t)}init(){dlmReportsInstance.tabNagivation(),dlmReportsInstance.overViewTab(),dlmReportsInstance.togglePageSettings(),dlmReportsInstance.fetchUserData(),dlmReportsInstance.setSpinner(jQuery("#users_download_log")),dlmReportsInstance.setSpinner(jQuery("#total_downloads_table_wrapper2")),dlmReportsInstance.fetchUsersReportsData(),jQuery(document).trigger("dlm_reports_init",[dlmReportsInstance]),dlmReportsInstance.eventsFunctions()}overViewTab(){dlmReportsInstance.dlmCreateChart(dlmReportsInstance.stats.chartStats,dlmReportsInstance.chartContainer),dlmReportsInstance.dlmDownloadsSummary(),dlmReportsInstance.datePickerContainer.addEventListener("click",dlmReportsInstance.toggleDatepicker.bind(this)),dlmReportsInstance.setTodayDownloads(),dlmReportsInstance.handleTopDownloads(),jQuery(document).on("click","body",function(e){e.stopPropagation(),0<jQuery(dlmReportsInstance.datePickerContainer).find("#dlm_date_range_picker").length&&dlmReportsInstance.hideDatepicker(jQuery(dlmReportsInstance.datePickerContainer),{target:"dlm-date-range-picker"})})}userReportsTab(){0!==Object.values(dlmReportsInstance.dlmUsersStats).length&&(dlmReportsInstance.logsDataByDate(dlmReportsInstance.dates.downloads.start_date,dlmReportsInstance.dates.downloads.end_date),dlmReportsInstance.handleUserDownloads(),dlmReportsInstance.filterDownloads())}getDates(e,t){const a={};let n=e;for(;n<=t;)a[this.createDateElement(n)]=0,n=this.getNextDay(n);return a}getMonths(e){const t={};return Object.keys(e).map(e=>{e=e.substring(0,7);void 0===t[e]&&(t[e]=0)}),t}getDoubleMonths(e){const t={},a=Object.keys(e)[0],n=Object.keys(e)[Object.keys(e).length-1];let s=0,o=a.substring(0,7),r=n.substring(0,7);return Object.keys(e).map(e=>{e=e.substring(0,7);o!==e&&r!==e&&(o=e,s++),void 0===t[e]&&0==s%2&&(t[e]=0)}),t}getWeeks(e){let a={};return Object.keys(e).forEach(e=>{let t;t=15<moment(e).date()?e.substring(0,7)+"-15":e.substring(0,7)+"-01",void 0===a[t]&&(a[t]=0)}),a}getWeek(e){let t={},a=Object.keys(e)[Object.keys(e).length-1],n=0;return Object.keys(e).map(e=>{void 0===t[e]&&0==n%7&&(t[e]=0),n++}),void 0===t[a]&&(t[a]=0),t}getDoubleDays(e){let t={},a=Object.keys(e)[0],n=Object.keys(e)[Object.keys(e).length-1],s=0;return Object.keys(e).map(e=>{a!==e&&n!==e&&(a=e,s++),void 0===t[e]&&0==s%2&&(t[e]=0)}),t}getNextDay(e){const t=new Date(e);return t.setDate(e.getDate()+1),t}createDateElement(e){var t=(e.getMonth()+1<10?"0":"")+(e.getMonth()+1);return e.getFullYear()+"-"+t+"-"+("0"+e.getDate()).slice(-2)}getSetDates(e,t){let a,n;if(void 0!==e&&e)a=dlmReportsInstance.createDateElement(new Date(e));else{const s=new Date;s.setDate(s.getDate()-30),a=dlmReportsInstance.createDateElement(s)}if(void 0!==t&&t){e=new Date(t);n=dlmReportsInstance.createDateElement(e)}else{const o=new Date;o.setDate(o.getDate()+1),n=dlmReportsInstance.createDateElement(o)}return{startDate:a,endDate:n}}createDataOnDate(e,t){let{startDate:a,endDate:n}={...dlmReportsInstance.getSetDates(e,t)},s,o,r,d,l,c=(dlmReportsInstance.reportsData=void 0!==dlmReportsInstance.dlmReportsStats?JSON.parse(JSON.stringify(dlmReportsInstance.dlmReportsStats)):{},o=moment(n,"YYYY-MM-DD").month()-moment(a,"YYYY-MM-DD").month(),r=moment(n,"YYYY-MM-DD").year()-moment(a,"YYYY-MM-DD").year(),s=moment(n).date()-moment(a).date(),dlmReportsInstance.chartType="day",0==r&&-6<o&&o<6?1<o||o<-1?dlmReportsInstance.chartType=2==o?"week":"weeks":1==o&&(8<s||-14<s||0==s)&&(dlmReportsInstance.chartType="days"):o<=0?dlmReportsInstance.chartType="month":dlmReportsInstance.chartType="months",dlmReportsInstance.getDates(new Date(a),new Date(n))),m,i,p,g;switch(dlmReportsInstance.chartType){case"months":i=dlmReportsInstance.getDoubleMonths(c),l=i;break;case"month":var u=dlmReportsInstance.getMonths(c);l=u;break;case"weeks":p=dlmReportsInstance.getWeeks(c),l=p;break;case"week":g=dlmReportsInstance.getWeek(c),l=g;break;case"days":m=dlmReportsInstance.getDoubleDays(c),l=m;break;case"day":l=c}Object.values(dlmReportsInstance.reportsData).forEach((s,e)=>{var o=JSON.parse(s.download_ids);if(void 0!==c[s.date])switch(dlmReportsInstance.chartType){case"months":d=s.date.substring(0,7);let e=parseInt(s.date.substring(5,7)),t=s.date.substring(0,5),a=6<(e-1).length?t+(e-1):t+"0"+(e-1);Object.values(o).forEach((e,t)=>{void 0===i[d]?void 0!==i[a]&&(i[a]=i[a]+e.downloads):i[d]=i[d]+e.downloads}),l=i;break;case"month":d=s.date.substring(0,7),Object.values(o).forEach((e,t)=>{monthDownloads[d]=void 0!==monthDownloads[d]?monthDownloads[d]+e.downloads:e.downloads}),l=monthDownloads;break;case"weeks":d=15<moment(s.date).date()?s.date.substring(0,7)+"-15":s.date.substring(0,7)+"-01",Object.values(o).forEach((e,t)=>{p[d]=void 0!==p[d]?p[d]+e.downloads:e.downloads}),l=p;break;case"week":d=s.date,Object.values(o).forEach((t,e)=>{if(void 0===g[d])for(let e=1;e<8;e++){var a=moment(s.date).date(moment(s.date).date()-e).format("YYYY-MM-DD");void 0!==g[a]&&(g[a]=g[a]+t.downloads)}else g[d]=g[d]+t.downloads}),l=g;break;case"days":d=s.date;let n=moment(s.date).date(moment(s.date).date()-1).format("YYYY-MM-DD");Object.values(o).forEach((e,t)=>{void 0===m[d]?void 0!==m[n]&&(m[n]=m[n]+e.downloads):m[d]=m[d]+e.downloads}),l=m;break;case"day":Object.values(o).forEach((e,t)=>{c[s.date]=c[s.date]+e.downloads}),l=c}else delete dlmReportsInstance.reportsData[e]});const h=Object.keys(c);e=h.length,t=h.findIndex(e=>a===e);let I=h.findIndex(e=>n===e);-1===t&&-1===I?dlmReportsInstance.stats={chartStats:Object.assign({},l),summaryStats:!1,daysLength:e}:(-1===I&&(I=e),dlmReportsInstance.stats={chartStats:Object.assign({},l),summaryStats:dlmReportsInstance.reportsData,daysLength:e})}dlmCreateChart(t,a,n=!1){if(t&&a){let e=Chart.getChart("total_downloads_chart");dlmReportsInstance.chartDataObject={dataSetLabel:"Downloads",dataSetColor:"#27ae60",dataSetbg:dlmReportsInstance.chartGradient,dataSetPointbg:dlmReportsInstance.chartColors.darkCyan.default,dataSetBorder:dlmReportsInstance.chartColors.darkCyan.default,dataSetElementColor:"#2ecc71",lineType:"original",xAxis:"x",chartData:t},void 0!==e&&e.destroy(),jQuery(document).trigger("dlm_reports_before_data_sets",[dlmReportsInstance.chartDataObject,t,n]),0<dlmReportsInstance.dataSets.length&&(dlmReportsInstance.dataSets=dlmReportsInstance.dataSets.filter(e=>dlmReportsInstance.chartDataObject.lineType!==e.origin)),dlmReportsInstance.dataSets.push({origin:dlmReportsInstance.chartDataObject.lineType,label:dlmReportsInstance.chartDataObject.dataSetLabel,color:dlmReportsInstance.chartDataObject.dataSetColor,data:dlmReportsInstance.chartDataObject.chartData,type:"line",fill:!0,backgroundColor:dlmReportsInstance.chartDataObject.dataSetbg,pointBackgroundColor:dlmReportsInstance.chartDataObject.dataSetPointbg,pointHoverBackgroundColor:"#fff",borderColor:dlmReportsInstance.chartDataObject.dataSetBorder,pointBorderWidth:1,lineTension:.3,borderWidth:1,pointRadius:3,elements:{line:{borderColor:dlmReportsInstance.chartDataObject.dataSetElementColor,borderWidth:1},point:{radius:4,hoverRadius:4,pointStyle:"circle"}}});t=Object.values(dlmReportsInstance.dataSets).filter(e=>"original"===e.origin);let o=Object.keys(t[0].data);dlmReportsInstance.dataSets.sort(function(e,t){return"original"===e.origin?-1:1}),dlmReportsInstance.chart=new Chart(a,{title:"",data:{datasets:dlmReportsInstance.dataSets},height:450,is_series:1,options:{aspectRatio:5,animation:!1,interaction:{mode:"index",intersect:!1},stacked:!1,scales:{x:{grid:{display:!1},ticks:{callback:e=>{let t="";var a=o[e],n=o[o.length-1],s=moment(n).month(moment(n).month()-1).format("YYYY-MM");return t="undefined"!==dlmReportsInstance.chartType&&"months"===dlmReportsInstance.chartType?(e=moment(o[e]).month())<11?a===s?moment(a).format("MMM, YYYY"):moment(a).format("MMM")+" - "+moment(a).month(e+1).format("MMM")+moment(a).format(", YYYY"):a===s||a===n?moment(a).format("MMM, YYYY"):moment(a).format("MMM")+moment(a).format(" YYYY")+" - "+moment(a).month(e+1).format("MMM")+moment(a).month(e+1).format(", YYYY"):"undefined"!==dlmReportsInstance.chartType&&"months"===dlmReportsInstance.chartType?moment(a).format("MMMM, YYYY"):moment(a).format("D MMM")}}},y:{grid:{drawBorder:!1},min:0,max:0!==dlmReportsInstance.getMaxDownload()?1===Math.ceil(dlmReportsInstance.getMaxDownload()/10)?dlmReportsInstance.getMaxDownload()+1:10*Math.ceil(dlmReportsInstance.getMaxDownload()/10):100,ticks:{stepSize:0!==dlmReportsInstance.getMaxDownload()?Math.ceil(dlmReportsInstance.getMaxDownload()/4):25,callback:e=>dlmReportsInstance.shortNumber(e)}}},normalized:!0,parsing:{xAxisKey:"x",yAxisKey:"y"},plugins:{tooltip:{enabled:!1,external:dlmReportsInstance.externalTooltipHandler.bind(dlmReportsInstance,this)},legend:{display:!0}}}})}}dlmDownloadsSummary(){let a={};if(!1===dlmReportsInstance.stats||!1===dlmReportsInstance.stats.summaryStats||Object.keys(dlmReportsInstance.stats.summaryStats).length<=0)return this.setTotalDownloads(0),this.setDailyAverage(0),void this.setMostDownloaded("--");dlmReportsInstance.totalDownloads=0,dlmReportsInstance.stats.summaryStats.forEach(e=>{e=JSON.parse(e.download_ids),Object.entries(e).forEach(([e,t])=>{dlmReportsInstance.totalDownloads+=t.downloads,a[e]=void 0===a[e]?{downloads:t.downloads,title:t.title,id:e}:{downloads:a[e].downloads+t.downloads,title:t.title,id:e}})}),dlmReportsInstance.mostDownloaded=dlmReportsInstance.orderItems(Object.values(a),"desc","downloads"),dlmReportsInstance.setTotalDownloads(dlmReportsInstance.totalDownloads),dlmReportsInstance.setDailyAverage((dlmReportsInstance.totalDownloads/parseInt(dlmReportsInstance.stats.daysLength)).toFixed(0)),dlmReportsInstance.setMostDownloaded(dlmReportsInstance.mostDownloaded[0].title)}createDatepicker(e,t,a){const n=new Date;let s=n.getDate()-1,o=n.getMonth()+1,r=o-1;var d=n.getFullYear(),l=(s<10&&(s="0"+s),o<10&&(o="0"+o),r<10&&(r="0"+r),d+"-"+o+"-"+s),d=d+"-"+r+"-"+s,c=jQuery("<div>").addClass("dlm_rdrs_overlay"),a=jQuery("<div>").attr("id",a.replace("#",""));return"dlm-date-range-picker"===t.target?(dlmReportsInstance.startDateInput=jQuery("<input>").attr("type","hidden").attr("id","dlm_start_date").attr("value",d),dlmReportsInstance.endDateInput=jQuery("<input>").attr("type","hidden").attr("id","dlm_end_date").attr("value",l),c.append(a).append(dlmReportsInstance.startDateInput).append(dlmReportsInstance.endDateInput)):jQuery(document).trigger("dlm_create_date_picker_"+t.target,[dlmReportsInstance,c,a,d,l]),c}displayDatepicker(e,o){var t;if(jQuery(e)){if(t="#"+jQuery(e).attr("id").replace(/-/gi,"_"),"dlm-date-range-picker"===o.target){if(dlmReportsInstance.datePicker.opened)return;dlmReportsInstance.datePicker.opened=!0}else jQuery(document).trigger("dlm_display_datepicker_"+o.target,[dlmReportsInstance,o,e]);let s=dlmReportsInstance.createDatepicker(e,o,t);e.append(s);var a=0<Object.keys(dlmReportsInstance.dlmReportsStats).length?new Date(dlmReportsInstance.dlmReportsStats[0].date):new Date,n=(new Date,[]),e=(jQuery(document).trigger("dlm_datepicker_shortcuts_"+o.target,[dlmReportsInstance,o,e,n]),{separator:" to ",autoClose:!0,getValue:function(){},setValue:function(e,t,a){s.find('input[type="hidden"]').first().val(t),s.find('input[type="hidden"]').last().val(a)},inline:!0,alwaysOpen:!0,container:t,endDate:new Date,startDate:a,showShortcuts:!0,shortcuts:null,customShortcuts:n});s.dateRangePicker(e).on("datepicker-change",(e,t)=>{var a,n;t.date1&&t.date2&&(a=t.date1.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"2-digit"}),n=t.date2.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"2-digit"}),s.parent().find("span.date-range-info").text(a+" - "+n)),"dlm-date-range-picker"===o.target?(dlmReportsInstance.dates.downloads={start_date:t.date1,end_date:t.date2},dlmReportsInstance.createDataOnDate(dlmReportsInstance.dates.downloads.start_date,dlmReportsInstance.dates.downloads.end_date),dlmReportsInstance.dlmCreateChart(dlmReportsInstance.stats.chartStats,dlmReportsInstance.chartContainer,!1),dlmReportsInstance.dlmDownloadsSummary(),0<Object.values(dlmReportsInstance.dlmUsersStats.logs).length&&dlmReportsInstance.logsDataByDate(dlmReportsInstance.dates.downloads.start_date,dlmReportsInstance.dates.downloads.end_date)):jQuery(document).trigger("dlm_daterangepicker_init_"+o.target,[dlmReportsInstance,t.date1,t.date2]),dlmReportsInstance.setTopDownloads(),s.data("dateRangePicker").close()}),"dlm-date-range-picker"===o.target?s.data("dateRangePicker").setDateRange(dlmReportsInstance.dates.downloads.start_date,dlmReportsInstance.dates.downloads.end_date):jQuery(document).trigger("dlm_daterangepicker_after_init_"+o.target,[s,dlmReportsInstance])}}hideDatepicker(e,t){"dlm-date-range-picker"===t.target?dlmReportsInstance.datePicker.opened=!1:jQuery(document).trigger("dlm_hide_datepicker_"+t.target,[dlmReportsInstance,e,t]),e.find(".dlm_rdrs_overlay").remove()}toggleDatepicker(e){e.stopPropagation();const t=jQuery(e.target).parents(".dlm-reports-header-date-selector");e={target:t.attr("id"),object:dlmReportsInstance.datePicker};dlmReportsInstance.closeDatePickers(t),"dlm-date-range-picker"===e.target?dlmReportsInstance.datePicker.opened?dlmReportsInstance.hideDatepicker(t,e):dlmReportsInstance.displayDatepicker(t,e):jQuery(document).trigger("dlm_toggle_datepicker_"+e.target,[dlmReportsInstance,t,e])}setTotalDownloads(e){jQuery(".dlm-reports-block-summary li#total span").html(e.toLocaleString())}setDailyAverage(e){jQuery(".dlm-reports-block-summary li#average span").html(e.toLocaleString())}setMostDownloaded(e){jQuery(".dlm-reports-block-summary li#most_popular span").html(e)}setTodayDownloads(){let e=0;Object.keys(dlmReportsInstance.dlmReportsStats).length<=0?jQuery(".dlm-reports-block-summary li#today span").html(e.toLocaleString()):(dlmReportsInstance.dlmReportsStats[dlmReportsInstance.dlmReportsStats.length-1].date===dlmReportsInstance.createDateElement(new Date)&&(e=Object.values(JSON.parse(dlmReportsInstance.dlmReportsStats[dlmReportsInstance.dlmReportsStats.length-1].download_ids)).reduce((e,t)=>e+t.downloads,0)),jQuery(".dlm-reports-block-summary li#today span").html(e))}setTopDownloads(e=0,t=!1){const a=jQuery("#total_downloads_table_wrapper2"),n=jQuery("#total_downloads_table_wrapper2 .total_downloads_table__list");if(n.empty(),n.parent().addClass("empty"),dlmReportsInstance.mostDownloaded&&!0!==t){var s=JSON.parse(JSON.stringify(dlmReportsInstance.mostDownloaded)).slice(10*parseInt(e),10*parseInt(e+1));for(let e=0;e<s.length;e++){const r=dlmReportsInstance.getDownloadByID(s[e].id);if(void 0===r)return;var o={id:s[e].id,title:s[e].title,edit_link:dlmAdminUrl+"post.php?post="+s[e].id+"&action=edit",total_downloads:r.total.toLocaleString()};jQuery(document).trigger("dlm_reports_top_downloads_item_before_render",[o,dlmReportsInstance,s[e],r]),new dlmBackBone.modelTopDownloads(o)}n.parent().removeClass("empty"),10<dlmReportsInstance.mostDownloaded.length?a.find(".downloads-block-navigation button").removeClass("hidden"):a.find(".downloads-block-navigation button").addClass("hidden"),dlmReportsInstance.stopSpinner(jQuery("#total_downloads_table_wrapper2"))}}handleTopDownloads(){jQuery("html body").on("click","#total_downloads_table_wrapper2 .downloads-block-navigation button",function(){let e=jQuery(this).parents("#total_downloads_table_wrapper2"),t=e,a=e.attr("data-page"),n=jQuery(this),s=parseInt(a)+1,o=0!==a?parseInt(a)-1:0,r=e.find(".downloads-block-navigation").find("button").first(),d=e.find(".downloads-block-navigation").find("button").last();n.attr("disabled","disabled");var l={data:dlmReportsInstance.mostDownloaded,main_parent:e,offsetHolder:t,offset:a,link:n,nextPage:s,prevPage:o,prevButton:r,nextButton:d,doAction:dlmReportsInstance.setTopDownloads};dlmReportsInstance.handleSliderNavigation(l)})}handleSliderNavigation(e){const{data:t,offsetHolder:a,offset:n,link:s,nextPage:o,prevPage:r,prevButton:d,nextButton:l,doAction:c}={...e};"load-more"===s.data("action")?(a.attr("data-page",o),c(o),Math.ceil(t.length/10)>o+1&&l.removeAttr("disabled"),d.removeAttr("disabled")):0!==parseInt(n)&&(a.attr("data-page",r),c(r),1!==parseInt(n)&&d.removeAttr("disabled"),l.removeAttr("disabled"))}tabNagivation(){jQuery(document).on("click",".dlm-reports .dlm-insights-tab-navigation > li",function(){const e=jQuery(this),t=jQuery(".dlm-reports .dlm-insights-tab-navigation > li").not(e),a=jQuery('div.dlm-insights-tab-navigation__content[data-id="'+e.attr("id")+'"]'),n=jQuery("div.dlm-insights-tab-navigation__content").not(a);e.hasClass("active")||(e.addClass("active"),t.removeClass("active"),a.addClass("active"),n.removeClass("active"))})}getOrCreateTooltip(e){let t=e.canvas.parentNode.querySelector("div.dlm-canvas-tooltip"),a=e.canvas.parentNode.querySelector("div.dlm-reports-tooltip__line");if(t||((a=document.createElement("div")).className="dlm-reports-tooltip__line"),!t){(t=document.createElement("div")).className="dlm-canvas-tooltip";const n=document.createElement("div");n.className="dlm-reports-tooltip",t.appendChild(n),e.canvas.parentNode.appendChild(t),e.canvas.parentNode.appendChild(a)}return{tooltipEl:t,tooltipLine:a}}externalTooltipHandler(d,e){const{chart:t,tooltip:l}=e,{tooltipEl:a,tooltipLine:n}={...d.getOrCreateTooltip(t)};e=jQuery(a).parent().width();if(0===l.opacity)return a.style.opacity=0,void(n.style.opacity=0);if(l.body){const c=l.title||[],m=document.createElement("div"),i=(m.className="dlm-reports-tooltip__header",c.forEach(e=>{const t=document.createElement("div"),a=(t.className="dlm-reports-tooltip__row",document.createElement("p")),n=(a.className="dlm-reports-tooltip__info",a.appendChild(document.createTextNode("Downloads")),t.appendChild(a),jQuery(document).trigger("dlm_chart_tooltip_before",[dlmReportsInstance,l,t,d]),document.createElement("p"));n.className="dlm-reports-tooltip__date";var s=dlmReportsInstance.setChartTooltipDate(l.dataPoints[0].label,d,d.stats.chartStats);n.appendChild(document.createTextNode(s)),t.appendChild(n);const o=document.createElement("p"),r=(o.className="dlm-reports-tooltip__downloads",document.createElement("span"));r.className="dlm-reports-tooltip__downloads_pointer",r.style.backgroundColor=dlmReportsInstance.chartColors.darkCyan.default,o.appendChild(r),o.appendChild(document.createTextNode(dlmReportsInstance.shortNumber(l.dataPoints[0].formattedValue))),t.appendChild(o),jQuery(document).trigger("dlm_chart_tooltip_after",[dlmReportsInstance,l,t,d]),m.appendChild(t)}),a.querySelector("div.dlm-reports-tooltip"));for(;i.firstChild;)i.firstChild.remove();i.appendChild(m)}var{offsetLeft:s,offsetTop:o}=t.canvas;a.style.opacity=1;let r={isMargin:!(n.style.opacity=1),left:!1};l.caretX-l.width<0&&(r.isMargin=!0,r.left=!0),s+l.caretX+l.width>e&&(r.isMargin=!0,r.left=!1),r.isMargin?r.left?a.style.left=s+l.width+"px":a.style.left=e-l.width+"px":a.style.left=s+l.caretX+"px",n.style.left=s+l.caretX+"px",a.style.top=o+l.caretY-a.offsetHeight-10+"px"}createUserRelatedData(){dlmReportsInstance.userRelatedData=[],Object.values(dlmReportsInstance.userDownloads).forEach((e,t)=>{var a;"0"!==e.user_id&&(a=[e.user_id,e.download_id,e.download_date,e.download_status],e="user_"+e.user_id,void 0!==dlmReportsInstance.userRelatedData[e]?dlmReportsInstance.userRelatedData[e].push(a):dlmReportsInstance.userRelatedData[e]=[a])})}logsDataByDate(e,t){var{startDate:e,endDate:t}={...dlmReportsInstance.getSetDates(e,t)};dlmReportsInstance.userDownloads=JSON.parse(JSON.stringify(dlmReportsInstance.dlmUsersStats.logs));let a=new Date(e),n=(a.setDate(a.getDate()-1),a=a.getTime(),new Date(t));n.setDate(n.getDate()+1),n=n.getTime(),dlmReportsInstance.userDownloads=dlmReportsInstance.userDownloads.filter((e,t)=>{e=dlmReportsInstance.createDateElement(new Date(e.download_date));return(e=new Date(e).getTime())>a&&e<n}),dlmReportsInstance.createUserRelatedData(),dlmReportsInstance.filterDownloads(),dlmReportsInstance.setMostActiveUser(),dlmReportsInstance.setLoggedOutDownloads(),dlmReportsInstance.setLoggedInDownloads(),jQuery(document).trigger("dlm_set_logs_data_by_date",[dlmReportsInstance])}setMostActiveUser(){var e=dlmReportsInstance.getUserByID(dlmReportsInstance.getMostActiveID()[0]);jQuery(".dlm-reports-block-summary li#most_active_user span").html(dlmReportsInstance.userToolTipMarkup(e))}getMostActiveID(){return Object.values(dlmReportsInstance.userRelatedData).length?Object.values(dlmReportsInstance.userRelatedData).reduce((e,t,a)=>parseInt(e.length)>parseInt(t.length)&&0<e.length&&null!==dlmReportsInstance.getUserByID(e[0][0])?e:null!==dlmReportsInstance.getUserByID(t[0][0])?t:[],[]):0}getUserByID(t){if(!t||"0"===t)return null;var e=Object.values(dlmReportsInstance.dlmUsersStats.users).filter(e=>parseInt(t)===parseInt(e.id));return Array.isArray(e)?0===e.length?null:e[0]:e}getLoggedInDownloads(){return Object.values(dlmReportsInstance.userRelatedData).length?1<Object.values(dlmReportsInstance.userRelatedData).length?Object.values(dlmReportsInstance.userRelatedData).reduce((e,t)=>parseInt(e)+parseInt(t.length),0):Object.values(dlmReportsInstance.userRelatedData)[0].length:0}setLoggedInDownloads(){const e=dlmReportsInstance.getLoggedInDownloads();jQuery(".dlm-reports-block-summary li#logged_in span,#total_downloads_summary_wrapper .dlm-reports-logged-in").html(e.toLocaleString())}getLoggedOutDownloads(){return dlmReportsInstance.userDownloads.length-dlmReportsInstance.getLoggedInDownloads()}setLoggedOutDownloads(){const e=dlmReportsInstance.getLoggedOutDownloads();jQuery(".dlm-reports-block-summary li#logged_out span,#total_downloads_summary_wrapper .dlm-reports-logged-out").html(e.toLocaleString())}userToolTipMarkup(e){let t='<div class="dlm-user-reports">';return t=(t=t+'<div class="wpchill-tooltip"><i>[?]</i>'+'<div class="wpchill-tooltip-content">')+("<span>User ID: "+(null!==e?e.id:"--")+"</span>"),"object"!=typeof e&&e.url.length&&(t+="<span>User URL: "+(null!==e?e.url:"--")+"</span>"),t+="<span>User registration date: "+(null!==e?e.registered:"--")+"</span>",null!==e&&void 0!==e.role&&e.role.length&&(t+="<span>User role: "+e.role+"</span>"),t=(t+="</div></div>")+(null!==e?e.display_name:"--")+"</div>"}setUserDownloads(e=0,t=!1){const a=jQuery("#users_download_log"),n=jQuery("#users_download_log .user-logs__list");if(n.empty(),!0!==t){let t=[];t=(null!==dlmReportsInstance.tempDownloads?JSON.parse(JSON.stringify(dlmReportsInstance.tempDownloads)):JSON.parse(JSON.stringify(dlmReportsInstance.userDownloads))).slice(10*parseInt(e),10*parseInt(e+1));for(let e=0;e<t.length;e++){var s=dlmReportsInstance.getUserByID(t[e].user_id.toString()),o=dlmReportsInstance.getDownloadCPT(t[e].download_id.toString()),r={key:e,user:"0"!==t[e].user_id&&null!=s?s.display_name:"--",ip:t[e].user_ip,role:null!==s&&null!==s.role?s.role:"--",download:void 0!==o?o.title:"--",valid_user:"0"!==t[e].user_id,edit_link:"user-edit.php?user_id="+t[e].user_id,edit_download_link:void 0!==o?dlmAdminUrl+"post.php?post="+o.id+"&action=edit":"#",status:t[e].download_status,download_date:t[e].download_date};jQuery(document).trigger("dlm_reports_user_logs_item_before_render",[r,dlmReportsInstance,t[e],s,o]),new dlmBackBone.modelUserLogs(r)}dlmReportsInstance.stopSpinner(jQuery("#users_download_log")),10!==t.length?a.find('.user-downloads-block-navigation button[data-action="load-more"]').attr("disabled","disabled"):a.find('.user-downloads-block-navigation button[data-action="load-more"]').removeAttr("disabled"),10<dlmReportsInstance.userDownloads.length?a.find(".user-downloads-block-navigation button").removeClass("hidden"):a.find(".user-downloads-block-navigation button").addClass("hidden")}}filterDownloads(){dlmReportsInstance.tempDownloads=JSON.parse(JSON.stringify(dlmReportsInstance.userDownloads)),dlmReportsInstance.currentFilters.length&&dlmReportsInstance.currentFilters.forEach(t=>{dlmReportsInstance.tempDownloads=dlmReportsInstance.tempDownloads.filter(e=>t.on===e[t.type])}),dlmReportsInstance.setUserDownloads()}handleUserDownloads(){jQuery(".user-downloads-block-navigation").on("click","button",function(e){e.stopPropagation();let t=jQuery(this).parents("#users_downloads_table_wrapper"),a=t.find("#users_download_log"),n=a.attr("data-page"),s=jQuery(this),o=parseInt(n)+1,r=0!==n?parseInt(n)-1:0,d=t.find(".downloads-block-navigation button").first(),l=t.find(".downloads-block-navigation button").last();s.attr("disabled","disabled");e={data:dlmReportsInstance.tempDownloads,main_parent:t,offsetHolder:a,offset:n,link:s,nextPage:o,prevPage:r,prevButton:d,nextButton:l,doAction:dlmReportsInstance.setUserDownloads};dlmReportsInstance.handleSliderNavigation(e)})}togglePageSettings(){jQuery("#dlm-toggle-settings").on("click",function(e){e.stopPropagation(),jQuery(this).find(".dlm-toggle-settings__settings").toggleClass("display")}),jQuery(".dlm-toggle-settings__settings").on("click",function(e){e.stopPropagation()}),jQuery("html,body").on("click",function(){jQuery(this).find(".dlm-toggle-settings__settings").removeClass("display")}),jQuery(document).on("change",".wpchill-toggle__input",function(e){const t=jQuery(this),a=t.attr("name"),n={action:"dlm_update_report_setting",name:a,checked:t.is(":checked"),_ajax_nonce:dlmReportsNonce};jQuery.post(ajaxurl,n,function(e){a,jQuery(document).trigger("dlm_settings_ajax_response",[dlmReportsInstance,t,e])})})}getMaxDownload(){let t=0;return dlmReportsInstance.dataSets.forEach(e=>{e=Object.values(e.data).reduce((e,t)=>t<e?e:t,0);t<e&&(t=e)}),parseInt(t)}setChartTooltipDate(e,t,a){let n="";var s,o,r;return n="undefined"!==t.chartType&&"months"===t.chartType?(moment(e).year(),s=moment(e).month(),a=Object.keys(a)[Object.keys(a).length-1],o=moment(a).month(moment(a).month()-1).format("YYYY-MM"),r=moment(e).format("YYYY-MM"),s<11?r===o?moment(r).format("MMMM, YYYY"):moment(e).format("MMM")+" - "+moment(e).month(s+1).format("MMM")+moment(e).format(", YYYY"):r===o||r===a?moment(r).format("MMMM, YYYY"):moment(e).format("MMM")+moment(e).format(" YYYY")+" - "+moment(e).month(s+1).format("MMM")+moment(e).month(s+1).format(", YYYY")):"undefined"!==t.chartType&&"months"===t.chartType?moment(e).format("MMMM, YYYY"):moment(e).format("MMMM Do, YY")}closeDatePickers(e){jQuery(".dlm-reports-header-date-selector").not(e).each(function(){var e={target:jQuery(this).attr("id")};dlmReportsInstance.hideDatepicker(jQuery(this),e)})}shortNumber(e){return e=4<=(e="string"==typeof e?e.replace(/,/gi,""):parseInt(e).toString()).length?parseInt(e.substring(0,e.length-3)).toLocaleString()+"k":e}getDownloadByID(t){let a={total:0},n;return dlmReportsInstance.tempDownloads.forEach(function(e){t===e.download_id&&(n=e,a.total=a.total+1,jQuery(document).trigger("dlm_download_by_id",[dlmReportsInstance,a,n]))}),a}getDownloadCPT(t){var e=dlmReportsInstance.mostDownloaded.filter(e=>e.id===t,0)[0];return jQuery(document).trigger("dlm_download_cpt",[dlmReportsInstance,e]),e}setSpinner(e){e.append('<div class="dlm-reports-spinner"><span></span></div>')}stopSpinner(e){e.find(".dlm-reports-spinner").remove()}eventsFunctions(){jQuery("body").on("click",".total_downloads_table_filters_total_downloads > a",function(e){e.preventDefault(),jQuery(this).parent().find("span.dashicons").toggleClass("dashicons-arrow-down dashicons-arrow-up"),dlmReportsInstance.orderOverviewItemsByTotal()}),jQuery("body").on("click",".total_downloads_table_filters_download_date > a",function(e){e.preventDefault(),jQuery(this).parent().find("span.dashicons").toggleClass("dashicons-arrow-down dashicons-arrow-up"),dlmReportsInstance.orderUserReportsItemsByDate()})}orderItems(e,a,n,t=0){return e.sort((e,t)=>"asc"!==a?t[n]-e[n]:e[n]-t[n]),e}orderOverviewItemsByTotal(){dlmReportsInstance.mostDownloaded=dlmReportsInstance.mostDownloaded.reverse(),dlmReportsInstance.setTopDownloads()}orderUserReportsItemsByDate(){dlmReportsInstance.tempDownloads=dlmReportsInstance.tempDownloads.reverse(),dlmReportsInstance.setUserDownloads()}}
1
+ jQuery(function(e){const t=new DLM_Reports;dlmReportsInstance.fetchReportsData(),e(document).on("dlm_downloads_report_fetched",function(){t.init()})});class DLM_Reports{dlmReportsStats=[];dlmUsersStats={logs:[],users:[]};currentFilters=[];tempDownloads=null;templates={};totalDownloads=0;perPage=dlmReportsPerPage;constructor(){(dlmReportsInstance=this).chartContainer=document.getElementById("total_downloads_chart");const e=dlmReportsInstance.chartContainer.getContext("2d");dlmReportsInstance.chartColors={purple:{default:"rgba(149, 76, 233, 1)",threesome:"rgba(149, 76, 233, 0.75)",half:"rgba(149, 76, 233, 0.5)",quarter:"rgba(149, 76, 233, 0.5)",zero:"rgba(149, 76, 233, 0.05)"},blue:{default:"rgba(67, 56, 202, 1)",threesome:"rgba(67, 56, 202, 0.75)",half:"rgba(67, 56, 202, 0.5)",quarter:"rgba(67, 56, 202, 0.25)",zero:"rgba(67, 56, 202, 0.05)"},green:{default:"rgba(00, 255, 00, 1)",threesome:"rgba(00, 255, 00, 0.75)",half:"rgba(00, 255, 00, 0.5)",quarter:"rgba(00, 255, 00, 0.25)",zero:"rgba(67, 56, 202, 0.05)"},royalBlue:{default:"rgba(65, 105, 225, 1)",threesome:"rgba(65, 105, 225, 0.75)",half:"rgba(65, 105, 225, 0.5)",quarter:"rgba(65, 105, 225, 0.25)",zero:"rgba(65, 105, 225, 0.05)"},persianBlue:{default:"rgba(28, 57, 187, 1)",threesome:"rgba(28, 57, 187, 0.75)",half:"rgba(28, 57, 187, 0.5)",quarter:"rgba(28, 57, 187, 0.25)",zero:"rgba(28, 57, 187, 0.05)"},darkCyan:{default:"rgba(0,129,167, 1)",threesome:"rgba(0,129,167, 0.75)",half:"rgba(0,129,167, 0.5)",quarter:"rgba(0,129,167, 0.25)",zero:"rgba(0,129,167, 0.05)"},strongCyan:{default:"rgba(0, 175, 185, 1)",threesome:"rgba(0, 175, 185, 0.75)",half:"rgba(0, 175, 185, 0.5)",quarter:"rgba(0, 175, 185, 0.25)",zero:"rgba(0, 175, 185, 0.05)"}},dlmReportsInstance.chartGradient=e.createLinearGradient(0,25,0,300),dlmReportsInstance.chartGradient.addColorStop(0,dlmReportsInstance.chartColors.darkCyan.half),dlmReportsInstance.chartGradient.addColorStop(.45,dlmReportsInstance.chartColors.darkCyan.quarter),dlmReportsInstance.chartGradient.addColorStop(1,dlmReportsInstance.chartColors.darkCyan.zero),dlmReportsInstance.datePickerContainer=document.getElementById("dlm-date-range-picker"),dlmReportsInstance.dataSets=[];let t=new Date;dlmReportsInstance.dates={downloads:{start_date:new Date(t.setMonth(t.getMonth()-1)),end_date:new Date}},dlmReportsInstance.chartDataObject={}}async fetchReportsData(){const e=jQuery('div[data-id="general_info"]'),t=await fetch(dlmDownloadReportsAPI);if(!t.ok){const a=document.createElement("div"),n=(a.className="dlm-loading-data",document.createTextNode("Seems like we bumped into an error! ")),s=document.createTextNode("Data fetching returned a status text of : "+fetchedData.statusText),o=document.createElement("h1"),r=document.createElement("h3");throw o.appendChild(n),r.appendChild(s),a.appendChild(o),a.appendChild(r),e.find(".dlm-loading-data").remove(),e.append(a),new Error("Something went wrong! Reports response did not come OK - "+fetchedData.statusText)}dlmReportsInstance.dlmReportsStats=await t.json(),dlmReportsInstance.mostDownloaded=!1,dlmReportsInstance.stats=!1,dlmReportsInstance.chartType="day",0<window.location.href.indexOf("dlm_time")&&(dlmReportsInstance.dates.downloads.start_date=0<Object.keys(dlmReportsInstance.dlmReportsStats).length?new Date(dlmReportsInstance.dlmReportsStats[0].date):new Date,dlmReportsInstance.dates.downloads.end_date=new Date,jQuery("#dlm-date-range-picker .date-range-info").html(dlmReportsInstance.dates.downloads.start_date.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"2-digit"})+" - "+dlmReportsInstance.dates.downloads.end_date.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"2-digit"}))),dlmReportsInstance.createDataOnDate(dlmReportsInstance.dates.downloads.start_date,dlmReportsInstance.dates.downloads.end_date),dlmReportsInstance.datePicker={opened:!1},jQuery(document).trigger("dlm_downloads_report_fetched",[dlmReportsInstance,dlmReportsInstance.dlmReportsStats])}async fetchUsersReportsData(e=0,t=dlmPHPinfo.retrieved_rows){const a=jQuery('div[data-id="user_reports"]');let n=dlmUserReportsAPI+"?offset="+e+"&limit="+t;0<dlmUserReportsAPI.indexOf("index.php?")&&(n=dlmUserReportsAPI+"&offset="+e+"&limit="+t);const s=await fetch(n);if(!s.ok)throw new Error("Something went wrong! Reports response did not come OK - "+s.statusText);e=await s.json();dlmReportsInstance.dlmUsersStats.logs=dlmReportsInstance.dlmUsersStats.logs.concat(e.logs),!0===e.done?(dlmReportsInstance.userDownloads=void 0!==dlmReportsInstance.dlmUsersStats.logs?JSON.parse(JSON.stringify(dlmReportsInstance.dlmUsersStats.logs)):{},a.find(".dlm-loading-data").remove(),dlmReportsInstance.userReportsTab(),dlmReportsInstance.setTopDownloads(),dlmReportsInstance.stopSpinner(jQuery("#total_downloads_table_wrapper2"))):dlmReportsInstance.fetchUsersReportsData(e.offset)}async fetchUserData(){const e=await fetch(dlmUserDataAPI);if(!e.ok)throw new Error("Something went wrong! Reports response did not come OK - "+e.statusText);var t=await e.json();dlmReportsInstance.dlmUsersStats.users=dlmReportsInstance.dlmUsersStats.users.concat(t)}init(){dlmReportsInstance.tabNagivation(),dlmReportsInstance.overViewTab(),dlmReportsInstance.togglePageSettings(),dlmReportsInstance.fetchUserData(),dlmReportsInstance.setSpinner(jQuery("#users_download_log")),dlmReportsInstance.setSpinner(jQuery("#total_downloads_table_wrapper2")),dlmReportsInstance.fetchUsersReportsData(),jQuery(document).trigger("dlm_reports_init",[dlmReportsInstance]),dlmReportsInstance.eventsFunctions()}overViewTab(){dlmReportsInstance.dlmCreateChart(dlmReportsInstance.stats.chartStats,dlmReportsInstance.chartContainer),dlmReportsInstance.dlmDownloadsSummary(),dlmReportsInstance.datePickerContainer.addEventListener("click",dlmReportsInstance.toggleDatepicker.bind(this)),dlmReportsInstance.setTodayDownloads(),dlmReportsInstance.handleTopDownloads(),jQuery(document).on("click","body",function(e){e.stopPropagation(),0<jQuery(dlmReportsInstance.datePickerContainer).find("#dlm_date_range_picker").length&&dlmReportsInstance.hideDatepicker(jQuery(dlmReportsInstance.datePickerContainer),{target:"dlm-date-range-picker"})})}userReportsTab(){0!==Object.values(dlmReportsInstance.dlmUsersStats).length&&(dlmReportsInstance.logsDataByDate(dlmReportsInstance.dates.downloads.start_date,dlmReportsInstance.dates.downloads.end_date),dlmReportsInstance.handleUserDownloads(),dlmReportsInstance.filterDownloads())}getDates(e,t){const a={};let n=e;for(;n<=t;)a[this.createDateElement(n)]=0,n=this.getNextDay(n);return a}getMonths(e){const t={};return Object.keys(e).map(e=>{e=e.substring(0,7);void 0===t[e]&&(t[e]=0)}),t}getDoubleMonths(e){const t={},a=Object.keys(e)[0],n=Object.keys(e)[Object.keys(e).length-1];let s=0,o=a.substring(0,7),r=n.substring(0,7);return Object.keys(e).map(e=>{e=e.substring(0,7);o!==e&&r!==e&&(o=e,s++),void 0===t[e]&&0==s%2&&(t[e]=0)}),t}getWeeks(e){let a={};return Object.keys(e).forEach(e=>{let t;t=15<moment(e).date()?e.substring(0,7)+"-15":e.substring(0,7)+"-01",void 0===a[t]&&(a[t]=0)}),a}getWeek(e){let t={},a=Object.keys(e)[Object.keys(e).length-1],n=0;return Object.keys(e).map(e=>{void 0===t[e]&&0==n%7&&(t[e]=0),n++}),void 0===t[a]&&(t[a]=0),t}getDoubleDays(e){let t={},a=Object.keys(e)[0],n=Object.keys(e)[Object.keys(e).length-1],s=0;return Object.keys(e).map(e=>{a!==e&&n!==e&&(a=e,s++),void 0===t[e]&&0==s%2&&(t[e]=0)}),t}getNextDay(e){const t=new Date(e);return t.setDate(e.getDate()+1),t}createDateElement(e){var t=(e.getMonth()+1<10?"0":"")+(e.getMonth()+1);return e.getFullYear()+"-"+t+"-"+("0"+e.getDate()).slice(-2)}getSetDates(e,t){let a,n;if(void 0!==e&&e)a=dlmReportsInstance.createDateElement(new Date(e));else{const s=new Date;s.setDate(s.getDate()-30),a=dlmReportsInstance.createDateElement(s)}if(void 0!==t&&t){e=new Date(t);n=dlmReportsInstance.createDateElement(e)}else{const o=new Date;o.setDate(o.getDate()+1),n=dlmReportsInstance.createDateElement(o)}return{startDate:a,endDate:n}}createDataOnDate(e,t){let{startDate:a,endDate:n}={...dlmReportsInstance.getSetDates(e,t)},s,o,r,d,l,c=(dlmReportsInstance.reportsData=void 0!==dlmReportsInstance.dlmReportsStats?JSON.parse(JSON.stringify(dlmReportsInstance.dlmReportsStats)):{},o=moment(n,"YYYY-MM-DD").month()-moment(a,"YYYY-MM-DD").month(),r=moment(n,"YYYY-MM-DD").year()-moment(a,"YYYY-MM-DD").year(),s=moment(n).date()-moment(a).date(),dlmReportsInstance.chartType="day",0==r&&-6<o&&o<6?1<o||o<-1?dlmReportsInstance.chartType=2==o?"week":"weeks":1==o&&(8<s||-14<s||0==s)&&(dlmReportsInstance.chartType="days"):o<=0?dlmReportsInstance.chartType="month":dlmReportsInstance.chartType="months",dlmReportsInstance.getDates(new Date(a),new Date(n))),p,i,m,g;switch(dlmReportsInstance.chartType){case"months":i=dlmReportsInstance.getDoubleMonths(c),l=i;break;case"month":var u=dlmReportsInstance.getMonths(c);l=u;break;case"weeks":m=dlmReportsInstance.getWeeks(c),l=m;break;case"week":g=dlmReportsInstance.getWeek(c),l=g;break;case"days":p=dlmReportsInstance.getDoubleDays(c),l=p;break;case"day":l=c}Object.values(dlmReportsInstance.reportsData).forEach((s,e)=>{var o=JSON.parse(s.download_ids);if(void 0!==c[s.date])switch(dlmReportsInstance.chartType){case"months":d=s.date.substring(0,7);let e=parseInt(s.date.substring(5,7)),t=s.date.substring(0,5),a=6<(e-1).length?t+(e-1):t+"0"+(e-1);Object.values(o).forEach((e,t)=>{void 0===i[d]?void 0!==i[a]&&(i[a]=i[a]+e.downloads):i[d]=i[d]+e.downloads}),l=i;break;case"month":d=s.date.substring(0,7),Object.values(o).forEach((e,t)=>{monthDownloads[d]=void 0!==monthDownloads[d]?monthDownloads[d]+e.downloads:e.downloads}),l=monthDownloads;break;case"weeks":d=15<moment(s.date).date()?s.date.substring(0,7)+"-15":s.date.substring(0,7)+"-01",Object.values(o).forEach((e,t)=>{m[d]=void 0!==m[d]?m[d]+e.downloads:e.downloads}),l=m;break;case"week":d=s.date,Object.values(o).forEach((t,e)=>{if(void 0===g[d])for(let e=1;e<8;e++){var a=moment(s.date).date(moment(s.date).date()-e).format("YYYY-MM-DD");void 0!==g[a]&&(g[a]=g[a]+t.downloads)}else g[d]=g[d]+t.downloads}),l=g;break;case"days":d=s.date;let n=moment(s.date).date(moment(s.date).date()-1).format("YYYY-MM-DD");Object.values(o).forEach((e,t)=>{void 0===p[d]?void 0!==p[n]&&(p[n]=p[n]+e.downloads):p[d]=p[d]+e.downloads}),l=p;break;case"day":Object.values(o).forEach((e,t)=>{c[s.date]=c[s.date]+e.downloads}),l=c}else delete dlmReportsInstance.reportsData[e]});const I=Object.keys(c);e=I.length,t=I.findIndex(e=>a===e);let h=I.findIndex(e=>n===e);-1===t&&-1===h?dlmReportsInstance.stats={chartStats:Object.assign({},l),summaryStats:!1,daysLength:e}:(-1===h&&(h=e),dlmReportsInstance.stats={chartStats:Object.assign({},l),summaryStats:dlmReportsInstance.reportsData,daysLength:e})}dlmCreateChart(t,a,n=!1){if(t&&a){let e=Chart.getChart("total_downloads_chart");dlmReportsInstance.chartDataObject={dataSetLabel:"Downloads",dataSetColor:"#27ae60",dataSetbg:dlmReportsInstance.chartGradient,dataSetPointbg:dlmReportsInstance.chartColors.darkCyan.default,dataSetBorder:dlmReportsInstance.chartColors.darkCyan.default,dataSetElementColor:"#2ecc71",lineType:"original",xAxis:"x",chartData:t},void 0!==e&&e.destroy(),jQuery(document).trigger("dlm_reports_before_data_sets",[dlmReportsInstance.chartDataObject,t,n]),0<dlmReportsInstance.dataSets.length&&(dlmReportsInstance.dataSets=dlmReportsInstance.dataSets.filter(e=>dlmReportsInstance.chartDataObject.lineType!==e.origin)),dlmReportsInstance.dataSets.push({origin:dlmReportsInstance.chartDataObject.lineType,label:dlmReportsInstance.chartDataObject.dataSetLabel,color:dlmReportsInstance.chartDataObject.dataSetColor,data:dlmReportsInstance.chartDataObject.chartData,type:"line",fill:!0,backgroundColor:dlmReportsInstance.chartDataObject.dataSetbg,pointBackgroundColor:dlmReportsInstance.chartDataObject.dataSetPointbg,pointHoverBackgroundColor:"#fff",borderColor:dlmReportsInstance.chartDataObject.dataSetBorder,pointBorderWidth:1,lineTension:.3,borderWidth:1,pointRadius:3,elements:{line:{borderColor:dlmReportsInstance.chartDataObject.dataSetElementColor,borderWidth:1},point:{radius:4,hoverRadius:4,pointStyle:"circle"}}});t=Object.values(dlmReportsInstance.dataSets).filter(e=>"original"===e.origin);let o=Object.keys(t[0].data);dlmReportsInstance.dataSets.sort(function(e,t){return"original"===e.origin?-1:1}),dlmReportsInstance.chart=new Chart(a,{title:"",data:{datasets:dlmReportsInstance.dataSets},height:450,is_series:1,options:{aspectRatio:5,animation:!1,interaction:{mode:"index",intersect:!1},stacked:!1,scales:{x:{grid:{display:!1},ticks:{callback:e=>{let t="";var a=o[e],n=o[o.length-1],s=moment(n).month(moment(n).month()-1).format("YYYY-MM");return t="undefined"!==dlmReportsInstance.chartType&&"months"===dlmReportsInstance.chartType?(e=moment(o[e]).month())<11?a===s?moment(a).format("MMM, YYYY"):moment(a).format("MMM")+" - "+moment(a).month(e+1).format("MMM")+moment(a).format(", YYYY"):a===s||a===n?moment(a).format("MMM, YYYY"):moment(a).format("MMM")+moment(a).format(" YYYY")+" - "+moment(a).month(e+1).format("MMM")+moment(a).month(e+1).format(", YYYY"):"undefined"!==dlmReportsInstance.chartType&&"months"===dlmReportsInstance.chartType?moment(a).format("MMMM, YYYY"):moment(a).format("D MMM")}}},y:{grid:{drawBorder:!1},min:0,max:0!==dlmReportsInstance.getMaxDownload()?1===Math.ceil(dlmReportsInstance.getMaxDownload()/10)?dlmReportsInstance.getMaxDownload()+1:10*Math.ceil(dlmReportsInstance.getMaxDownload()/10):100,ticks:{stepSize:0!==dlmReportsInstance.getMaxDownload()?Math.ceil(dlmReportsInstance.getMaxDownload()/4):25,callback:e=>dlmReportsInstance.shortNumber(e)}}},normalized:!0,parsing:{xAxisKey:"x",yAxisKey:"y"},plugins:{tooltip:{enabled:!1,external:dlmReportsInstance.externalTooltipHandler.bind(dlmReportsInstance,this)},legend:{display:!0}}}})}}dlmDownloadsSummary(){let a={};if(!1===dlmReportsInstance.stats||!1===dlmReportsInstance.stats.summaryStats||Object.keys(dlmReportsInstance.stats.summaryStats).length<=0)return this.setTotalDownloads(0),this.setDailyAverage(0),void this.setMostDownloaded("--");dlmReportsInstance.totalDownloads=0,dlmReportsInstance.stats.summaryStats.forEach(e=>{e=JSON.parse(e.download_ids),Object.entries(e).forEach(([e,t])=>{dlmReportsInstance.totalDownloads+=t.downloads,a[e]=void 0===a[e]?{downloads:t.downloads,title:t.title,id:e}:{downloads:a[e].downloads+t.downloads,title:t.title,id:e}})}),dlmReportsInstance.mostDownloaded=dlmReportsInstance.orderItems(Object.values(a),"desc","downloads"),dlmReportsInstance.setTotalDownloads(dlmReportsInstance.totalDownloads),dlmReportsInstance.setDailyAverage((dlmReportsInstance.totalDownloads/parseInt(dlmReportsInstance.stats.daysLength)).toFixed(0)),dlmReportsInstance.setMostDownloaded(dlmReportsInstance.mostDownloaded[0].title)}createDatepicker(e,t,a){const n=new Date;let s=n.getDate()-1,o=n.getMonth()+1,r=o-1;var d=n.getFullYear(),l=(s<10&&(s="0"+s),o<10&&(o="0"+o),r<10&&(r="0"+r),d+"-"+o+"-"+s),d=d+"-"+r+"-"+s,c=jQuery("<div>").addClass("dlm_rdrs_overlay"),a=jQuery("<div>").attr("id",a.replace("#",""));return"dlm-date-range-picker"===t.target?(dlmReportsInstance.startDateInput=jQuery("<input>").attr("type","hidden").attr("id","dlm_start_date").attr("value",d),dlmReportsInstance.endDateInput=jQuery("<input>").attr("type","hidden").attr("id","dlm_end_date").attr("value",l),c.append(a).append(dlmReportsInstance.startDateInput).append(dlmReportsInstance.endDateInput)):jQuery(document).trigger("dlm_create_date_picker_"+t.target,[dlmReportsInstance,c,a,d,l]),c}displayDatepicker(e,o){var t;if(jQuery(e)){if(t="#"+jQuery(e).attr("id").replace(/-/gi,"_"),"dlm-date-range-picker"===o.target){if(dlmReportsInstance.datePicker.opened)return;dlmReportsInstance.datePicker.opened=!0}else jQuery(document).trigger("dlm_display_datepicker_"+o.target,[dlmReportsInstance,o,e]);let s=dlmReportsInstance.createDatepicker(e,o,t);e.append(s);var a=0<Object.keys(dlmReportsInstance.dlmReportsStats).length?new Date(dlmReportsInstance.dlmReportsStats[0].date):new Date,n=(new Date,[]),e=(jQuery(document).trigger("dlm_datepicker_shortcuts_"+o.target,[dlmReportsInstance,o,e,n]),{separator:" to ",autoClose:!0,getValue:function(){},setValue:function(e,t,a){s.find('input[type="hidden"]').first().val(t),s.find('input[type="hidden"]').last().val(a)},inline:!0,alwaysOpen:!0,container:t,endDate:new Date,startDate:a,showShortcuts:!0,shortcuts:null,customShortcuts:n});s.dateRangePicker(e).on("datepicker-change",(e,t)=>{var a,n;t.date1&&t.date2&&(a=t.date1.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"2-digit"}),n=t.date2.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"2-digit"}),s.parent().find("span.date-range-info").text(a+" - "+n)),"dlm-date-range-picker"===o.target?(dlmReportsInstance.dates.downloads={start_date:t.date1,end_date:t.date2},dlmReportsInstance.createDataOnDate(dlmReportsInstance.dates.downloads.start_date,dlmReportsInstance.dates.downloads.end_date),dlmReportsInstance.dlmCreateChart(dlmReportsInstance.stats.chartStats,dlmReportsInstance.chartContainer,!1),dlmReportsInstance.dlmDownloadsSummary(),0<Object.values(dlmReportsInstance.dlmUsersStats.logs).length&&dlmReportsInstance.logsDataByDate(dlmReportsInstance.dates.downloads.start_date,dlmReportsInstance.dates.downloads.end_date)):jQuery(document).trigger("dlm_daterangepicker_init_"+o.target,[dlmReportsInstance,t.date1,t.date2]),dlmReportsInstance.setTopDownloads(),s.data("dateRangePicker").close()}),"dlm-date-range-picker"===o.target?s.data("dateRangePicker").setDateRange(dlmReportsInstance.dates.downloads.start_date,dlmReportsInstance.dates.downloads.end_date):jQuery(document).trigger("dlm_daterangepicker_after_init_"+o.target,[s,dlmReportsInstance])}}hideDatepicker(e,t){"dlm-date-range-picker"===t.target?dlmReportsInstance.datePicker.opened=!1:jQuery(document).trigger("dlm_hide_datepicker_"+t.target,[dlmReportsInstance,e,t]),e.find(".dlm_rdrs_overlay").remove()}toggleDatepicker(e){e.stopPropagation();const t=jQuery(e.target).parents(".dlm-reports-header-date-selector");e={target:t.attr("id"),object:dlmReportsInstance.datePicker};dlmReportsInstance.closeDatePickers(t),"dlm-date-range-picker"===e.target?dlmReportsInstance.datePicker.opened?dlmReportsInstance.hideDatepicker(t,e):dlmReportsInstance.displayDatepicker(t,e):jQuery(document).trigger("dlm_toggle_datepicker_"+e.target,[dlmReportsInstance,t,e])}setTotalDownloads(e){jQuery(".dlm-reports-block-summary li#total span").html(e.toLocaleString())}setDailyAverage(e){jQuery(".dlm-reports-block-summary li#average span").html(e.toLocaleString())}setMostDownloaded(e){jQuery(".dlm-reports-block-summary li#most_popular span").html(e)}setTodayDownloads(){let e=0;Object.keys(dlmReportsInstance.dlmReportsStats).length<=0?jQuery(".dlm-reports-block-summary li#today span").html(e.toLocaleString()):(dlmReportsInstance.dlmReportsStats[dlmReportsInstance.dlmReportsStats.length-1].date===dlmReportsInstance.createDateElement(new Date)&&(e=Object.values(JSON.parse(dlmReportsInstance.dlmReportsStats[dlmReportsInstance.dlmReportsStats.length-1].download_ids)).reduce((e,t)=>e+t.downloads,0)),jQuery(".dlm-reports-block-summary li#today span").html(e))}setTopDownloads(e=0,t=!1){const a=jQuery("#total_downloads_table_wrapper2"),n=jQuery("#total_downloads_table_wrapper2 .total_downloads_table__list");if(n.empty(),n.parent().addClass("empty"),dlmReportsInstance.mostDownloaded&&!0!==t){var s=JSON.parse(JSON.stringify(dlmReportsInstance.mostDownloaded)).slice(dlmReportsInstance.perPage*parseInt(e),dlmReportsInstance.perPage*parseInt(e+1));for(let e=0;e<s.length;e++){const r=dlmReportsInstance.getDownloadByID(s[e].id);if(void 0===r)return;var o={id:s[e].id,title:s[e].title,edit_link:dlmAdminUrl+"post.php?post="+s[e].id+"&action=edit",total_downloads:r.total.toLocaleString()};jQuery(document).trigger("dlm_reports_top_downloads_item_before_render",[o,dlmReportsInstance,s[e],r]),new dlmBackBone.modelTopDownloads(o)}n.parent().removeClass("empty"),a.find(".dlm-reports-total-pages").html(Math.ceil(dlmReportsInstance.mostDownloaded.length/dlmReportsInstance.perPage)),parseInt(dlmReportsInstance.perPage)!==parseInt(s.length)?a.find('.downloads-block-navigation button[data-action="load-more"]').attr("disabled","disabled"):a.find('.downloads-block-navigation button[data-action="load-more"]').removeAttr("disabled"),dlmReportsInstance.mostDownloaded.length>dlmReportsInstance.perPage?a.find(".downloads-block-navigation button").removeClass("hidden"):a.find(".downloads-block-navigation button").addClass("hidden"),dlmReportsInstance.stopSpinner(jQuery("#total_downloads_table_wrapper2"))}}handleTopDownloads(){jQuery("html body").on("click","#total_downloads_table_wrapper2 .downloads-block-navigation button",function(){let e=jQuery(this).parents("#total_downloads_table_wrapper2"),t=e,a=e.attr("data-page"),n=jQuery(this),s=parseInt(a)+1,o=0!==a?parseInt(a)-1:0,r=e.find(".downloads-block-navigation").find("button").first(),d=e.find(".downloads-block-navigation").find("button").last();n.attr("disabled","disabled");var l={data:dlmReportsInstance.mostDownloaded,main_parent:e,offsetHolder:t,offset:a,link:n,nextPage:s,prevPage:o,prevButton:r,nextButton:d,doAction:dlmReportsInstance.setTopDownloads};dlmReportsInstance.handleSliderNavigation(l)}),jQuery("#total_downloads_table_wrapper2").find("input.dlm-reports-current-page").on("change",function(){dlmReportsInstance.paginationChange(jQuery(this),dlmReportsInstance.mostDownloaded,jQuery("#total_downloads_table_wrapper2"),jQuery(this).parents("#total_downloads_table_wrapper2"),dlmReportsInstance.setTopDownloads)})}handleSliderNavigation(e){const{data:t,main_parent:a,offsetHolder:n,offset:s,link:o,nextPage:r,prevPage:d,prevButton:l,nextButton:c,doAction:p}={...e};let i=1;"load-more"===o.data("action")?(n.attr("data-page",r),p(r),Math.ceil(t.length/dlmReportsInstance.perPage)>r+1&&c.removeAttr("disabled"),l.removeAttr("disabled"),i=parseInt(r)+1):0!==parseInt(s)&&(n.attr("data-page",d),p(d),1!==parseInt(s)&&l.removeAttr("disabled"),c.removeAttr("disabled"),i=parseInt(d)+1),a.find(".dlm-reports-current-page").val(i)}tabNagivation(){jQuery(document).on("click",".dlm-reports .dlm-insights-tab-navigation > li",function(){const e=jQuery(this),t=jQuery(".dlm-reports .dlm-insights-tab-navigation > li").not(e),a=jQuery('div.dlm-insights-tab-navigation__content[data-id="'+e.attr("id")+'"]'),n=jQuery("div.dlm-insights-tab-navigation__content").not(a);e.hasClass("active")||(e.addClass("active"),t.removeClass("active"),a.addClass("active"),n.removeClass("active"))})}getOrCreateTooltip(e){let t=e.canvas.parentNode.querySelector("div.dlm-canvas-tooltip"),a=e.canvas.parentNode.querySelector("div.dlm-reports-tooltip__line");if(t||((a=document.createElement("div")).className="dlm-reports-tooltip__line"),!t){(t=document.createElement("div")).className="dlm-canvas-tooltip";const n=document.createElement("div");n.className="dlm-reports-tooltip",t.appendChild(n),e.canvas.parentNode.appendChild(t),e.canvas.parentNode.appendChild(a)}return{tooltipEl:t,tooltipLine:a}}externalTooltipHandler(d,e){const{chart:t,tooltip:l}=e,{tooltipEl:a,tooltipLine:n}={...d.getOrCreateTooltip(t)};e=jQuery(a).parent().width();if(0===l.opacity)return a.style.opacity=0,void(n.style.opacity=0);if(l.body){const c=l.title||[],p=document.createElement("div"),i=(p.className="dlm-reports-tooltip__header",c.forEach(e=>{const t=document.createElement("div"),a=(t.className="dlm-reports-tooltip__row",document.createElement("p")),n=(a.className="dlm-reports-tooltip__info",a.appendChild(document.createTextNode("Downloads")),t.appendChild(a),jQuery(document).trigger("dlm_chart_tooltip_before",[dlmReportsInstance,l,t,d]),document.createElement("p"));n.className="dlm-reports-tooltip__date";var s=dlmReportsInstance.setChartTooltipDate(l.dataPoints[0].label,d,d.stats.chartStats);n.appendChild(document.createTextNode(s)),t.appendChild(n);const o=document.createElement("p"),r=(o.className="dlm-reports-tooltip__downloads",document.createElement("span"));r.className="dlm-reports-tooltip__downloads_pointer",r.style.backgroundColor=dlmReportsInstance.chartColors.darkCyan.default,o.appendChild(r),o.appendChild(document.createTextNode(dlmReportsInstance.shortNumber(l.dataPoints[0].formattedValue))),t.appendChild(o),jQuery(document).trigger("dlm_chart_tooltip_after",[dlmReportsInstance,l,t,d]),p.appendChild(t)}),a.querySelector("div.dlm-reports-tooltip"));for(;i.firstChild;)i.firstChild.remove();i.appendChild(p)}var{offsetLeft:s,offsetTop:o}=t.canvas;a.style.opacity=1;let r={isMargin:!(n.style.opacity=1),left:!1};l.caretX-l.width<0&&(r.isMargin=!0,r.left=!0),s+l.caretX+l.width>e&&(r.isMargin=!0,r.left=!1),r.isMargin?r.left?a.style.left=s+l.width+"px":a.style.left=e-l.width+"px":a.style.left=s+l.caretX+"px",n.style.left=s+l.caretX+"px",a.style.top=o+l.caretY-a.offsetHeight-10+"px"}createUserRelatedData(){dlmReportsInstance.userRelatedData=[],Object.values(dlmReportsInstance.userDownloads).forEach((e,t)=>{var a;"0"!==e.user_id&&(a=[e.user_id,e.download_id,e.download_date,e.download_status],e="user_"+e.user_id,void 0!==dlmReportsInstance.userRelatedData[e]?dlmReportsInstance.userRelatedData[e].push(a):dlmReportsInstance.userRelatedData[e]=[a])})}logsDataByDate(e,t){var{startDate:e,endDate:t}={...dlmReportsInstance.getSetDates(e,t)};dlmReportsInstance.userDownloads=JSON.parse(JSON.stringify(dlmReportsInstance.dlmUsersStats.logs));let a=new Date(e),n=(a.setDate(a.getDate()-1),a=a.getTime(),new Date(t));n.setDate(n.getDate()+1),n=n.getTime(),dlmReportsInstance.userDownloads=dlmReportsInstance.userDownloads.filter((e,t)=>{e=dlmReportsInstance.createDateElement(new Date(e.download_date));return(e=new Date(e).getTime())>a&&e<n}),dlmReportsInstance.createUserRelatedData(),dlmReportsInstance.filterDownloads(),dlmReportsInstance.setMostActiveUser(),dlmReportsInstance.setLoggedOutDownloads(),dlmReportsInstance.setLoggedInDownloads(),jQuery(document).trigger("dlm_set_logs_data_by_date",[dlmReportsInstance])}setMostActiveUser(){var e=dlmReportsInstance.getUserByID(dlmReportsInstance.getMostActiveID()[0]);jQuery(".dlm-reports-block-summary li#most_active_user span").html(dlmReportsInstance.userToolTipMarkup(e))}getMostActiveID(){return Object.values(dlmReportsInstance.userRelatedData).length?Object.values(dlmReportsInstance.userRelatedData).reduce((e,t,a)=>parseInt(e.length)>parseInt(t.length)&&0<e.length&&null!==dlmReportsInstance.getUserByID(e[0][0])?e:null!==dlmReportsInstance.getUserByID(t[0][0])?t:[],[]):0}getUserByID(t){if(!t)return null;if("0"===t)return{role:"Guest",display_name:"Guest"};var e=Object.values(dlmReportsInstance.dlmUsersStats.users).filter(e=>parseInt(t)===parseInt(e.id));return Array.isArray(e)?0===e.length?null:e[0]:e}getLoggedInDownloads(){return Object.values(dlmReportsInstance.userRelatedData).length?1<Object.values(dlmReportsInstance.userRelatedData).length?Object.values(dlmReportsInstance.userRelatedData).reduce((e,t)=>parseInt(e)+parseInt(t.length),0):Object.values(dlmReportsInstance.userRelatedData)[0].length:0}setLoggedInDownloads(){const e=dlmReportsInstance.getLoggedInDownloads();jQuery(".dlm-reports-block-summary li#logged_in span,#total_downloads_summary_wrapper .dlm-reports-logged-in").html(e.toLocaleString())}getLoggedOutDownloads(){return dlmReportsInstance.userDownloads.length-dlmReportsInstance.getLoggedInDownloads()}setLoggedOutDownloads(){const e=dlmReportsInstance.getLoggedOutDownloads();jQuery(".dlm-reports-block-summary li#logged_out span,#total_downloads_summary_wrapper .dlm-reports-logged-out").html(e.toLocaleString())}userToolTipMarkup(e){let t='<div class="dlm-user-reports">';return t=(t=t+'<div class="wpchill-tooltip"><i>[?]</i>'+'<div class="wpchill-tooltip-content">')+("<span>User ID: "+(null!==e?e.id:"--")+"</span>"),"object"!=typeof e&&e.url.length&&(t+="<span>User URL: "+(null!==e?e.url:"--")+"</span>"),t+="<span>User registration date: "+(null!==e?e.registered:"--")+"</span>",null!==e&&void 0!==e.role&&e.role.length&&(t+="<span>User role: "+e.role+"</span>"),t=(t+="</div></div>")+(null!==e?e.display_name:"--")+"</div>"}setUserDownloads(e=0,t=!1){const a=jQuery("#users_download_log"),n=jQuery("#users_download_log .user-logs__list");if(n.empty(),!0!==t){let t=[];t=(null!==dlmReportsInstance.tempDownloads?JSON.parse(JSON.stringify(dlmReportsInstance.tempDownloads)):JSON.parse(JSON.stringify(dlmReportsInstance.userDownloads))).slice(dlmReportsInstance.perPage*parseInt(e),dlmReportsInstance.perPage*parseInt(e+1));for(let e=0;e<t.length;e++){var s=dlmReportsInstance.getUserByID(t[e].user_id.toString()),o=dlmReportsInstance.getDownloadCPT(t[e].download_id.toString()),r={key:e,user:null!=s?s.display_name:"--",ip:t[e].user_ip,role:null!==s&&null!==s.role?s.role:"--",download:void 0!==o?o.title:"--",valid_user:"0"!==t[e].user_id,edit_link:"0"!==t[e].user_id?"user-edit.php?user_id="+t[e].user_id:"#",edit_download_link:void 0!==o?dlmAdminUrl+"post.php?post="+o.id+"&action=edit":"#",status:t[e].download_status,download_date:t[e].download_date};jQuery(document).trigger("dlm_reports_user_logs_item_before_render",[r,dlmReportsInstance,t[e],s,o]),new dlmBackBone.modelUserLogs(r)}dlmReportsInstance.stopSpinner(jQuery("#users_download_log")),a.find(".dlm-reports-total-pages").html(Math.ceil(dlmReportsInstance.tempDownloads.length/dlmReportsInstance.perPage)),parseInt(dlmReportsInstance.perPage)!==parseInt(t.length)?a.find('.user-downloads-block-navigation button[data-action="load-more"]').attr("disabled","disabled"):a.find('.user-downloads-block-navigation button[data-action="load-more"]').removeAttr("disabled"),dlmReportsInstance.userDownloads.length>dlmReportsInstance.perPage?a.find(".user-downloads-block-navigation button").removeClass("hidden"):a.find(".user-downloads-block-navigation button").addClass("hidden")}}filterDownloads(){dlmReportsInstance.tempDownloads=JSON.parse(JSON.stringify(dlmReportsInstance.userDownloads)),dlmReportsInstance.currentFilters.length&&dlmReportsInstance.currentFilters.forEach(t=>{dlmReportsInstance.tempDownloads=dlmReportsInstance.tempDownloads.filter(e=>t.on===e[t.type])}),dlmReportsInstance.setUserDownloads()}handleUserDownloads(){jQuery(".user-downloads-block-navigation").on("click","button",function(e){e.stopPropagation();let t=jQuery(this).parents("#users_downloads_table_wrapper"),a=t.find("#users_download_log"),n=a.attr("data-page"),s=jQuery(this),o=parseInt(n)+1,r=0!==n?parseInt(n)-1:0,d=t.find(".downloads-block-navigation button").first(),l=t.find(".downloads-block-navigation button").last();s.attr("disabled","disabled");e={data:dlmReportsInstance.tempDownloads,main_parent:t,offsetHolder:a,offset:n,link:s,nextPage:o,prevPage:r,prevButton:d,nextButton:l,doAction:dlmReportsInstance.setUserDownloads};dlmReportsInstance.handleSliderNavigation(e)}),jQuery("#users_downloads_table_wrapper").find("input.dlm-reports-current-page").on("change",function(){dlmReportsInstance.paginationChange(jQuery(this),dlmReportsInstance.tempDownloads,jQuery("#users_downloads_table_wrapper"),jQuery("#users_downloads_table_wrapper").find("#users_download_log"),dlmReportsInstance.setUserDownloads)})}togglePageSettings(){jQuery("#dlm-toggle-settings").on("click",function(e){e.stopPropagation(),jQuery(this).find(".dlm-toggle-settings__settings").toggleClass("display")}),jQuery(".dlm-toggle-settings__settings").on("click",function(e){e.stopPropagation()}),jQuery("html,body").on("click",function(){jQuery(this).find(".dlm-toggle-settings__settings").removeClass("display")}),jQuery(document).on("change",".wpchill-toggle__input",function(e){const t=jQuery(this),a=t.attr("name"),n={action:"dlm_update_report_setting",name:a,checked:t.is(":checked"),_ajax_nonce:dlmReportsNonce};jQuery.post(ajaxurl,n,function(e){a,jQuery(document).trigger("dlm_settings_ajax_response",[dlmReportsInstance,t,e])})})}getMaxDownload(){let t=0;return dlmReportsInstance.dataSets.forEach(e=>{e=Object.values(e.data).reduce((e,t)=>t<e?e:t,0);t<e&&(t=e)}),parseInt(t)}setChartTooltipDate(e,t,a){let n="";var s,o,r;return n="undefined"!==t.chartType&&"months"===t.chartType?(moment(e).year(),s=moment(e).month(),a=Object.keys(a)[Object.keys(a).length-1],o=moment(a).month(moment(a).month()-1).format("YYYY-MM"),r=moment(e).format("YYYY-MM"),s<11?r===o?moment(r).format("MMMM, YYYY"):moment(e).format("MMM")+" - "+moment(e).month(s+1).format("MMM")+moment(e).format(", YYYY"):r===o||r===a?moment(r).format("MMMM, YYYY"):moment(e).format("MMM")+moment(e).format(" YYYY")+" - "+moment(e).month(s+1).format("MMM")+moment(e).month(s+1).format(", YYYY")):"undefined"!==t.chartType&&"months"===t.chartType?moment(e).format("MMMM, YYYY"):moment(e).format("MMMM Do, YY")}closeDatePickers(e){jQuery(".dlm-reports-header-date-selector").not(e).each(function(){var e={target:jQuery(this).attr("id")};dlmReportsInstance.hideDatepicker(jQuery(this),e)})}shortNumber(e){return e=4<=(e="string"==typeof e?e.replace(/,/gi,""):parseInt(e).toString()).length?parseInt(e.substring(0,e.length-3)).toLocaleString()+"k":e}getDownloadByID(t){let a={total:0},n;return dlmReportsInstance.tempDownloads.forEach(function(e){t===e.download_id&&(n=e,a.total=a.total+1,jQuery(document).trigger("dlm_download_by_id",[dlmReportsInstance,a,n]))}),a}getDownloadCPT(t){var e=dlmReportsInstance.mostDownloaded.filter(e=>e.id===t,0)[0];return jQuery(document).trigger("dlm_download_cpt",[dlmReportsInstance,e]),e}setSpinner(e){e.append('<div class="dlm-reports-spinner"><span></span></div>')}stopSpinner(e){e.find(".dlm-reports-spinner").remove()}eventsFunctions(){jQuery("body").on("click",".total_downloads_table_filters_total_downloads > a",function(e){e.preventDefault(),jQuery(this).parent().find("span.dashicons").toggleClass("dashicons-arrow-down dashicons-arrow-up"),dlmReportsInstance.orderOverviewItemsByTotal()}),jQuery("body").on("click",".total_downloads_table_filters_download_date > a",function(e){e.preventDefault(),jQuery(this).parent().find("span.dashicons").toggleClass("dashicons-arrow-down dashicons-arrow-up"),dlmReportsInstance.orderUserReportsItemsByDate()}),jQuery("body").on("change","select.dlm-reports-per-page",function(e){dlmReportsInstance.perPage=jQuery(this).val(),dlmReportsInstance.setTopDownloads(),dlmReportsInstance.setUserDownloads(),jQuery.post(ajaxurl,{action:"dlm_update_report_setting",name:"dlm-reports-per-page",value:dlmReportsInstance.perPage,_ajax_nonce:dlmReportsNonce},function(e){})})}orderItems(e,a,n,t=0){return e.sort((e,t)=>"asc"!==a?t[n]-e[n]:e[n]-t[n]),e}orderOverviewItemsByTotal(){dlmReportsInstance.mostDownloaded=dlmReportsInstance.mostDownloaded.reverse(),dlmReportsInstance.setTopDownloads()}orderUserReportsItemsByDate(){dlmReportsInstance.tempDownloads=dlmReportsInstance.tempDownloads.reverse(),dlmReportsInstance.setUserDownloads()}paginationChange(e,t,a,n,s){let o=parseInt(e.val()),r=(0===o&&(o=1),t.length<o*dlmReportsInstance.perPage&&(o=Math.ceil(t.length/dlmReportsInstance.perPage)),jQuery(this).next('button[data-action="load-more"]')),d=o+1,l=o-1,c=a.find(".downloads-block-navigation button").first(),p=a.find(".downloads-block-navigation button").last();r.attr("disabled","disabled");e={data:t,main_parent:a,offsetHolder:n,offset:o,link:r,nextPage:d,prevPage:l,prevButton:c,nextButton:p,doAction:s};dlmReportsInstance.handleSliderNavigation(e)}}
changelog.txt CHANGED
@@ -1,3 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  = 4.6.3 - 03.10.2022 =
2
  Fixed: Double sized downloads ( [#1059](https://github.com/WPChill/download-monitor/issues/1059) )
3
  Fixed: Failsafe logging for unsuccessful database upgrade ( [#1060](https://github.com/WPChill/download-monitor/issues/1060) )
1
+ = 4.6.4 - 07.10.2022 =
2
+ Fixed: Take target attribute into consideration when redirecting ( [#1049](https://github.com/WPChill/download-monitor/issues/1049) )
3
+ Changed: Removed caching of reports data, for instant data updates ( [#1070](https://github.com/WPChill/download-monitor/issues/1070) )
4
+ Fixed: Failsafe for XHR requests ( [#1067](https://github.com/WPChill/download-monitor/issues/1067) )
5
+ Fixed: Relevant XHR responses ( [#1066](https://github.com/WPChill/download-monitor/issues/1066) )
6
+ Fixed: Stop checking for file extensions when redirect ( [#1065](https://github.com/WPChill/download-monitor/issues/1065) )
7
+ Fixed: Reports data continuous retrieval when table download_log not present ( [#1064](https://github.com/WPChill/download-monitor/issues/1064) )
8
+ Fixed: Time zones logging error ( [#1063](https://github.com/WPChill/download-monitor/issues/1063) )
9
+ Added: Meta tag with Download Monitor version ( [#1062](https://github.com/WPChill/download-monitor/issues/1062) )
10
+ Fixed: Error when no button class present ( [#1061](https://github.com/WPChill/download-monitor/issues/1061) )
11
+ Fixed: Failsafe for failed database upgrade ( [#1060](https://github.com/WPChill/download-monitor/issues/1060) )
12
+ Fixed: Better display of guest downloads on Reports page ( [#1056](https://github.com/WPChill/download-monitor/issues/1056) )
13
+ Added: Reports page numbers ( [#1054](https://github.com/WPChill/download-monitor/issues/1054) )
14
+ Added: Reports page entries per page ( [#1053](https://github.com/WPChill/download-monitor/issues/1053) )
15
+ Fixed: Redirect to file when link target is _blank ( [#1049](https://github.com/WPChill/download-monitor/issues/1049) )
16
+ Added: Media Library filters for Download Monitor files ( [#1047](https://github.com/WPChill/download-monitor/issues/1047) )
17
+ Fixed: Ordering when postmeta is taken into consideration ( [#1046](https://github.com/WPChill/download-monitor/issues/1046) )
18
+
19
  = 4.6.3 - 03.10.2022 =
20
  Fixed: Double sized downloads ( [#1059](https://github.com/WPChill/download-monitor/issues/1059) )
21
  Fixed: Failsafe logging for unsuccessful database upgrade ( [#1060](https://github.com/WPChill/download-monitor/issues/1060) )
download-monitor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Download Monitor
4
  Plugin URI: https://www.download-monitor.com
5
  Description: A full solution for managing and selling downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
- Version: 4.6.3
7
  Author: WPChill
8
  Author URI: https://wpchill.com
9
  Requires at least: 5.4
@@ -34,7 +34,7 @@ if ( ! defined( 'ABSPATH' ) ) {
34
 
35
  // Define DLM Version
36
 
37
- define( 'DLM_VERSION', '4.6.3' );
38
  define( 'DLM_UPGRADER_VERSION', '4.6.0' );
39
 
40
  // Define DLM FILE
@@ -44,6 +44,11 @@ define( 'DLM_FILE', plugin_basename( __FILE__ ) );
44
  define( 'DLM_BETA', false );
45
  define( 'DLM_BETA_VERSION', 'x.x.x' );
46
 
 
 
 
 
 
47
  if ( version_compare( PHP_VERSION, '5.3.0' ) >= 0 ) {
48
  require_once plugin_dir_path( DLM_PLUGIN_FILE ) . 'includes/bootstrap.php';
49
  } else {
3
  Plugin Name: Download Monitor
4
  Plugin URI: https://www.download-monitor.com
5
  Description: A full solution for managing and selling downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
+ Version: 4.6.4
7
  Author: WPChill
8
  Author URI: https://wpchill.com
9
  Requires at least: 5.4
34
 
35
  // Define DLM Version
36
 
37
+ define( 'DLM_VERSION', '4.6.4' );
38
  define( 'DLM_UPGRADER_VERSION', '4.6.0' );
39
 
40
  // Define DLM FILE
44
  define( 'DLM_BETA', false );
45
  define( 'DLM_BETA_VERSION', 'x.x.x' );
46
 
47
+ // Add meta tags to head for DLM Version
48
+ add_action( 'wp_head', function () {
49
+ echo '<meta name="dlm-version" content="' . esc_attr( DLM_VERSION ) . '">';
50
+ }, 1 );
51
+
52
  if ( version_compare( PHP_VERSION, '5.3.0' ) >= 0 ) {
53
  require_once plugin_dir_path( DLM_PLUGIN_FILE ) . 'includes/bootstrap.php';
54
  } else {
includes/backwards-compatibility/class-dlm-backwards-compatibility.php CHANGED
@@ -45,12 +45,16 @@ class DLM_Backwards_Compatibility {
45
  */
46
  public function __construct() {
47
 
 
48
  add_filter( 'dlm_shortcode_total_downloads', array( $this, 'total_downloads_shortcode' ) );
 
49
  add_action( 'dlm_query_args', array( $this, 'orderby_compatibility' ), 15, 1 );
 
50
  add_action( 'dlm_reset_postdata', array( $this, 'reset_postdata' ), 15, 1 );
 
51
  add_filter( 'dlm_add_version_meta_download_count', array( $this, 'meta_download_counts' ), 15, 2 );
 
52
  add_filter( 'dlm_add_meta_download_count', array( $this, 'add_meta_download_count' ), 30, 2 );
53
-
54
  // If the DB upgrade functionality did not take place we won't have the option stored.
55
  $this->upgrade_option = get_option( 'dlm_db_upgraded' );
56
 
@@ -122,7 +126,8 @@ class DLM_Backwards_Compatibility {
122
  }
123
 
124
  if ( apply_filters( 'dlm_backwards_compatibility_orderby_meta', false ) ) {
125
- add_filter( 'dlm_admin_sort_columns', array( $this, 'no_log_query_args_compatibility' ) );
 
126
  return;
127
  }
128
 
45
  */
46
  public function __construct() {
47
 
48
+ // Add post meta count to total downloads.
49
  add_filter( 'dlm_shortcode_total_downloads', array( $this, 'total_downloads_shortcode' ) );
50
+ // Add orderby postmeta compatibility.
51
  add_action( 'dlm_query_args', array( $this, 'orderby_compatibility' ), 15, 1 );
52
+ // Reset postdata after the loop.
53
  add_action( 'dlm_reset_postdata', array( $this, 'reset_postdata' ), 15, 1 );
54
+ // Add version postmeta downloads to the version download count.
55
  add_filter( 'dlm_add_version_meta_download_count', array( $this, 'meta_download_counts' ), 15, 2 );
56
+ // Add Download postmeta downloads to the Download download count.
57
  add_filter( 'dlm_add_meta_download_count', array( $this, 'add_meta_download_count' ), 30, 2 );
 
58
  // If the DB upgrade functionality did not take place we won't have the option stored.
59
  $this->upgrade_option = get_option( 'dlm_db_upgraded' );
60
 
126
  }
127
 
128
  if ( apply_filters( 'dlm_backwards_compatibility_orderby_meta', false ) ) {
129
+ add_filter( 'dlm_admin_sort_columns', array( $this, 'no_log_query_args_compatibility' ), 15, 1 );
130
+ add_filter( 'dlm_query_args_filter', array( $this, 'no_log_query_args_compatibility' ), 15, 1 );
131
  return;
132
  }
133
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: wpchill, silkalns, barrykooij, mikejolley
3
  Tags: download manager, document management, file manager, digital store, ecommerce, document management plugin, download monitor, download counter, password protection, download protection, password, protect downloads, tracker, sell, shop, ecommerce, paypal
4
  Requires at least: 5.4
5
  Tested up to: 6.0
6
- Stable tag: 4.6.3
7
  License: GPLv3
8
  Text Domain: -
9
  Requires PHP: 5.6
@@ -121,6 +121,24 @@ More documentation can be found in our [Knowledge Base](https://www.download-mon
121
 
122
  == Changelog ==
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  = 4.6.3 - 03.10.2022 =
125
  Fixed: Double sized downloads ( [#1059](https://github.com/WPChill/download-monitor/issues/1059) )
126
  Fixed: Failsafe logging for unsuccessful database upgrade ( [#1060](https://github.com/WPChill/download-monitor/issues/1060) )
3
  Tags: download manager, document management, file manager, digital store, ecommerce, document management plugin, download monitor, download counter, password protection, download protection, password, protect downloads, tracker, sell, shop, ecommerce, paypal
4
  Requires at least: 5.4
5
  Tested up to: 6.0
6
+ Stable tag: 4.6.4
7
  License: GPLv3
8
  Text Domain: -
9
  Requires PHP: 5.6
121
 
122
  == Changelog ==
123
 
124
+ = 4.6.4 - 07.10.2022 =
125
+ Fixed: Take target attribute into consideration when redirecting ( [#1049](https://github.com/WPChill/download-monitor/issues/1049) )
126
+ Changed: Removed caching of reports data, for instant data updates ( [#1070](https://github.com/WPChill/download-monitor/issues/1070) )
127
+ Fixed: Failsafe for XHR requests ( [#1067](https://github.com/WPChill/download-monitor/issues/1067) )
128
+ Fixed: Relevant XHR responses ( [#1066](https://github.com/WPChill/download-monitor/issues/1066) )
129
+ Fixed: Stop checking for file extensions when redirect ( [#1065](https://github.com/WPChill/download-monitor/issues/1065) )
130
+ Fixed: Reports data continuous retrieval when table download_log not present ( [#1064](https://github.com/WPChill/download-monitor/issues/1064) )
131
+ Fixed: Time zones logging error ( [#1063](https://github.com/WPChill/download-monitor/issues/1063) )
132
+ Added: Meta tag with Download Monitor version ( [#1062](https://github.com/WPChill/download-monitor/issues/1062) )
133
+ Fixed: Error when no button class present ( [#1061](https://github.com/WPChill/download-monitor/issues/1061) )
134
+ Fixed: Failsafe for failed database upgrade ( [#1060](https://github.com/WPChill/download-monitor/issues/1060) )
135
+ Fixed: Better display of guest downloads on Reports page ( [#1056](https://github.com/WPChill/download-monitor/issues/1056) )
136
+ Added: Reports page numbers ( [#1054](https://github.com/WPChill/download-monitor/issues/1054) )
137
+ Added: Reports page entries per page ( [#1053](https://github.com/WPChill/download-monitor/issues/1053) )
138
+ Fixed: Redirect to file when link target is _blank ( [#1049](https://github.com/WPChill/download-monitor/issues/1049) )
139
+ Added: Media Library filters for Download Monitor files ( [#1047](https://github.com/WPChill/download-monitor/issues/1047) )
140
+ Fixed: Ordering when postmeta is taken into consideration ( [#1046](https://github.com/WPChill/download-monitor/issues/1046) )
141
+
142
  = 4.6.3 - 03.10.2022 =
143
  Fixed: Double sized downloads ( [#1059](https://github.com/WPChill/download-monitor/issues/1059) )
144
  Fixed: Failsafe logging for unsuccessful database upgrade ( [#1060](https://github.com/WPChill/download-monitor/issues/1060) )
src/Admin/Admin.php CHANGED
@@ -52,33 +52,32 @@ class DLM_Admin {
52
 
53
  // Dashboard
54
  add_action( 'wp_dashboard_setup', array( $this, 'admin_dashboard' ) );
55
-
56
  // Admin Footer Text
57
  add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1 );
58
-
59
  // flush rewrite rules on shutdown
60
  add_action( 'shutdown', array( $this, 'maybe_flush_rewrites' ) );
61
-
62
  // filter attachment thumbnails in media library for files in dlm_uploads
63
  add_filter( 'wp_prepare_attachment_for_js', array( $this, 'filter_thumbnails_protected_files_grid' ), 10, 1 );
64
  add_filter( 'wp_get_attachment_image_src', array( $this, 'filter_thumbnails_protected_files_list' ), 10, 1 );
65
-
66
  // Legacy Upgrader
67
  $lu_check = new DLM_LU_Checker();
68
  if ( $lu_check->needs_upgrading() ) {
69
  $lu_message = new DLM_LU_Message();
70
  $lu_message->display();
71
  }
72
-
73
  // Sets the rewrite rule option if dlm_download_endpoint option is changed.
74
  add_filter( 'pre_update_option_dlm_download_endpoint', array( $this, 'set_rewrite_rules_flag_on_endpoint_change'), 15, 2 );
75
-
76
  // Checks and flushes rewrite rule if rewrite flag option is set.
77
  add_action( 'admin_init', array( $this, 'check_rewrite_rules') );
78
-
79
  // Do not make sub-sizes for images uploaded in dlm_uploads
80
  add_filter( 'file_is_displayable_image', array( $this, 'no_image_subsizes' ), 15, 2 );
81
  add_filter( 'ajax_query_attachments_args', array( $this, 'no_media_library_display' ), 15 );
 
 
 
 
 
 
82
  }
83
 
84
  /**
@@ -422,23 +421,125 @@ class DLM_Admin {
422
  */
423
  public function no_media_library_display( $query ) {
424
 
425
- if ( ! isset( $query['meta_query'] ) ) {
426
- $query['meta_query'] = array(
427
- 'relation' => 'AND',
428
- array(
 
 
 
 
 
 
 
 
 
429
  'key' => '_wp_attached_file',
430
  'compare' => 'NOT LIKE',
431
  'value' => 'dlm_uploads'
432
- )
433
- );
434
  } else {
 
 
435
  $query['meta_query'][] = array(
436
  'key' => '_wp_attached_file',
437
- 'compare' => 'NOT LIKE',
438
  'value' => 'dlm_uploads'
439
  );
440
  }
441
 
442
  return $query;
443
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
444
  }
52
 
53
  // Dashboard
54
  add_action( 'wp_dashboard_setup', array( $this, 'admin_dashboard' ) );
 
55
  // Admin Footer Text
56
  add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1 );
 
57
  // flush rewrite rules on shutdown
58
  add_action( 'shutdown', array( $this, 'maybe_flush_rewrites' ) );
 
59
  // filter attachment thumbnails in media library for files in dlm_uploads
60
  add_filter( 'wp_prepare_attachment_for_js', array( $this, 'filter_thumbnails_protected_files_grid' ), 10, 1 );
61
  add_filter( 'wp_get_attachment_image_src', array( $this, 'filter_thumbnails_protected_files_list' ), 10, 1 );
 
62
  // Legacy Upgrader
63
  $lu_check = new DLM_LU_Checker();
64
  if ( $lu_check->needs_upgrading() ) {
65
  $lu_message = new DLM_LU_Message();
66
  $lu_message->display();
67
  }
 
68
  // Sets the rewrite rule option if dlm_download_endpoint option is changed.
69
  add_filter( 'pre_update_option_dlm_download_endpoint', array( $this, 'set_rewrite_rules_flag_on_endpoint_change'), 15, 2 );
 
70
  // Checks and flushes rewrite rule if rewrite flag option is set.
71
  add_action( 'admin_init', array( $this, 'check_rewrite_rules') );
 
72
  // Do not make sub-sizes for images uploaded in dlm_uploads
73
  add_filter( 'file_is_displayable_image', array( $this, 'no_image_subsizes' ), 15, 2 );
74
  add_filter( 'ajax_query_attachments_args', array( $this, 'no_media_library_display' ), 15 );
75
+ // Add a Media Library filter to list view so that we can filter out dlm_uploads
76
+ add_action( 'restrict_manage_posts', array( $this, 'add_dlm_uploads_filter' ), 15, 2 );
77
+ // Set query vars for dlm_uploads filter
78
+ add_action( 'pre_get_posts', array( $this, 'media_library_filter' ), 15 );
79
+ // Add DLM Uploads file as a mime type
80
+ add_filter( 'post_mime_types', array( $this, 'add_mime_types' ), 15, 1 );
81
  }
82
 
83
  /**
421
  */
422
  public function no_media_library_display( $query ) {
423
 
424
+ //Check for the added temporary mime_type so that we can filter the Media Library contents
425
+ if ( ! isset( $query['post_mime_type'] ) || 'dlm_uploads_files' !== $query['post_mime_type'] ) {
426
+ if ( ! isset( $query['meta_query'] ) ) {
427
+ $query['meta_query'] = array(
428
+ 'relation' => 'AND',
429
+ array(
430
+ 'key' => '_wp_attached_file',
431
+ 'compare' => 'NOT LIKE',
432
+ 'value' => 'dlm_uploads'
433
+ )
434
+ );
435
+ } else {
436
+ $query['meta_query'][] = array(
437
  'key' => '_wp_attached_file',
438
  'compare' => 'NOT LIKE',
439
  'value' => 'dlm_uploads'
440
+ );
441
+ }
442
  } else {
443
+ unset($query['post_mime_type']);
444
+ $query['meta_key'] = '_wp_attached_file';
445
  $query['meta_query'][] = array(
446
  'key' => '_wp_attached_file',
447
+ 'compare' => 'LIKE',
448
  'value' => 'dlm_uploads'
449
  );
450
  }
451
 
452
  return $query;
453
  }
454
+
455
+ /**
456
+ * Add Media Library filters for DLM Downloads
457
+ *
458
+ * @param $screen
459
+ * @param $which
460
+ *
461
+ * @return void
462
+ * @since 4.6.4
463
+ */
464
+ public function add_dlm_uploads_filter( $screen, $which ) {
465
+ // Add a filter to the Media Library page so that we can filter regular uploads and Download Monitor's uploads
466
+ if ( $screen === 'attachment' ) {
467
+ $views = apply_filters( 'dlm_media_views', array(
468
+ 'uploads_folder' => __( 'Uploads folder', 'download-monitor' ),
469
+ 'dlm_uploads_folder' => __( 'Download Monitor', 'download-monitor' )
470
+ ) );
471
+
472
+ $applied_filter = isset( $_GET['dlm_upload_folder_type'] ) ? sanitize_text_field( wp_unslash( $_GET['dlm_upload_folder_type'] ) ) : 'all';
473
+ ?>
474
+ <select name="dlm_upload_folder_type">
475
+ <?php
476
+ foreach ( $views as $key => $view ) {
477
+ echo '<option value="' . $key . '" ' . selected( $key, $applied_filter ) . '>' . $view . '</option>';
478
+ }
479
+ ?>
480
+ </select>
481
+ <?php
482
+ }
483
+ }
484
+
485
+ /**
486
+ * Filter the media library query to wether show DLM uploads or not
487
+ *
488
+ * @param $query
489
+ *
490
+ * @return void
491
+ * @since 4.6.4
492
+ */
493
+ public function media_library_filter( $query ) {
494
+
495
+ if ( ! is_admin() || false === strpos( $_SERVER['REQUEST_URI'], '/wp-admin/upload.php' ) ) {
496
+ return;
497
+ }
498
+ // If users views uploads folder then we don't need to show DLM uploads.
499
+ $compare = 'NOT LIKE';
500
+ // If user views the DLM Uploads folder then we need to show DLM uploads.
501
+ if ( isset( $_GET['dlm_upload_folder_type'] ) && 'dlm_uploads_folder' === $_GET['dlm_upload_folder_type'] ) {
502
+ $compare = 'LIKE';
503
+ }
504
+ // Set the meta query for the corresponding request.
505
+ $query->set( 'meta_key', '_wp_attached_file' );
506
+ $query->set( 'meta_query', array(
507
+ 'key' => '_wp_attached_file',
508
+ 'compare' => $compare,
509
+ 'value' => 'dlm_uploads'
510
+ ) );
511
+ }
512
+
513
+ /**
514
+ * Add temporary dlm_uploads_files mime type to help us filter the media library
515
+ *
516
+ * @param $mimes
517
+ *
518
+ * @return mixed
519
+ * @since 4.6.4
520
+ */
521
+ public function add_mime_types($mimes){
522
+ $screen = get_current_screen();
523
+ // If we are not on the Media Library page or editing the Download then we don't need to add the mime types.
524
+ if ( ! is_admin() || ( 'upload' !== $screen->base && 'attachment' !== $screen->post_type && 'dlm_download' !== $screen->post_type ) ) {
525
+ return $mimes;
526
+ }
527
+
528
+ // Create temp mime_type that will only be available on Media Library page and edit Download page.
529
+ // We need this to proper filter the Media Library contents and show only DLM uploads or regular uploads.
530
+ $mimes['dlm_uploads_files'] = array(
531
+ 'Download Monitor Files',
532
+ 'Manage DLM Files',
533
+ array(
534
+ 'dlm_uploads',
535
+ 'else',
536
+ 'singular' => 'DLM File',
537
+ 'plural' => 'DLM Files',
538
+ 'content' => null,
539
+ 'domain' => null
540
+ )
541
+ );
542
+
543
+ return $mimes;
544
+ }
545
  }
src/Admin/AdminScripts.php CHANGED
@@ -206,7 +206,8 @@ class DLM_Admin_Scripts {
206
 
207
  // Make JavaScript strings translatable
208
  wp_localize_script( 'dlm_reports', 'dlm_rs', $this->get_strings( 'reports' ) );
209
- wp_add_inline_script( 'dlm_reports', 'const dlmReportsNonce = "' . wp_create_nonce( 'dlm_reports_nonce' ) . '"; const dlmAdminUrl = "' . get_admin_url() . '";', 'before' );
 
210
 
211
  }
212
 
206
 
207
  // Make JavaScript strings translatable
208
  wp_localize_script( 'dlm_reports', 'dlm_rs', $this->get_strings( 'reports' ) );
209
+ $per_page = ( $item = get_option('dlm-reports-per-page') ) ? $item : 10;
210
+ wp_add_inline_script( 'dlm_reports', 'const dlmReportsPerPage = ' . absint($per_page) . ';const dlmReportsNonce = "' . wp_create_nonce( 'dlm_reports_nonce' ) . '"; const dlmAdminUrl = "' . get_admin_url() . '";', 'before' );
211
 
212
  }
213
 
src/Admin/Dashboard.php CHANGED
@@ -43,14 +43,19 @@ class DLM_Admin_Dashboard {
43
  array(
44
  'no_found_rows' => 1,
45
  'order_by_count' => '1',
 
 
46
  )
47
  );
48
 
 
 
 
49
  // This is a fix for Custom Posts ordering plugins
50
- add_action( 'pre_get_posts', array( $this, 'orderby_fix' ), 15 );
51
  $downloads = download_monitor()->service( 'download_repository' )->retrieve( $filters, 10 );
52
  // This is a fix for Custom Posts ordering plugins
53
- remove_action( 'pre_get_posts', array( $this, 'orderby_fix' ), 15 );
54
 
55
  if ( empty( $downloads ) ) {
56
  echo '<p>' . esc_html__( 'There are no stats available yet!', 'download-monitor' ) . '</p>';
43
  array(
44
  'no_found_rows' => 1,
45
  'order_by_count' => '1',
46
+ 'order' => 'DESC',
47
+ 'post_type' => 'dlm_download',
48
  )
49
  );
50
 
51
+ // @todo: Seems like from 4.6.x the below "add_action( 'pre_get_posts', array( $this, 'orderby_fix' ), 15 );" & "remove_action( 'pre_get_posts', array( $this, 'orderby_fix' ), 15 );" are not
52
+ // needed anymore, it seems to break order if used. Leaving them here for a while.
53
+
54
  // This is a fix for Custom Posts ordering plugins
55
+ //add_action( 'pre_get_posts', array( $this, 'orderby_fix' ), 15 );
56
  $downloads = download_monitor()->service( 'download_repository' )->retrieve( $filters, 10 );
57
  // This is a fix for Custom Posts ordering plugins
58
+ //remove_action( 'pre_get_posts', array( $this, 'orderby_fix' ), 15 );
59
 
60
  if ( empty( $downloads ) ) {
61
  echo '<p>' . esc_html__( 'There are no stats available yet!', 'download-monitor' ) . '</p>';
src/Admin/Reports/Page.php CHANGED
@@ -168,6 +168,8 @@ class DLM_Reports_Page {
168
  * @return void
169
  */
170
  public function insights_header() {
 
 
171
  ?>
172
  <div class="dlm-insights-header">
173
  <div class="dlm-insights-navigation">
@@ -175,6 +177,16 @@ class DLM_Reports_Page {
175
  $this->insights_navigation();
176
  ?>
177
  </div>
 
 
 
 
 
 
 
 
 
 
178
  <div class="dlm-insights-datepicker dlm-reports-actions">
179
  <?php
180
  do_action( 'dlm_insights_header' );
@@ -182,6 +194,7 @@ class DLM_Reports_Page {
182
  $this->page_settings();
183
  ?>
184
  </div>
 
185
  </div>
186
  <?php
187
  }
@@ -368,7 +381,7 @@ class DLM_Reports_Page {
368
  <div class="wrap">
369
  <hr class="wp-header-end">
370
  <div class="main">
371
- <h3><?php echo __( 'Please <a href="#" class="dlm-db-upgrade-link">upgrade the database</a> in order to further use Download Monitor\'s Reports page.', 'download-monitor' ); ?></h3>
372
  </div>
373
  </div>
374
  <?php
168
  * @return void
169
  */
170
  public function insights_header() {
171
+ $per_page = ( $item = get_option('dlm-reports-per-page') ) ? $item : 10;
172
+ $per_page_options = array(10, 25, 50, 100);
173
  ?>
174
  <div class="dlm-insights-header">
175
  <div class="dlm-insights-navigation">
177
  $this->insights_navigation();
178
  ?>
179
  </div>
180
+ <div class="dlm-reports-actions">
181
+ <span><?php esc_html_e( 'Show per page:' ); ?> </span>
182
+ <select class="dlm-reports-per-page">
183
+ <?php
184
+ foreach ( $per_page_options as $option ) {
185
+ echo '<option value="' . absint( $option ) . '" ' . selected( $option, $per_page, false ) . '>' . absint( $option ) . '</option>';
186
+ }
187
+ ?>
188
+ </select>
189
+
190
  <div class="dlm-insights-datepicker dlm-reports-actions">
191
  <?php
192
  do_action( 'dlm_insights_header' );
194
  $this->page_settings();
195
  ?>
196
  </div>
197
+ </div>
198
  </div>
199
  <?php
200
  }
381
  <div class="wrap">
382
  <hr class="wp-header-end">
383
  <div class="main">
384
+ <h3><?php echo __( 'Please <a href="#" class="dlm-db-upgrade-link">upgrade the database</a>.', 'download-monitor' ); ?></h3>
385
  </div>
386
  </div>
387
  <?php
src/Admin/Reports/class-dlm-reports.php CHANGED
@@ -227,7 +227,8 @@ if ( ! class_exists( 'DLM_Reports' ) ) {
227
 
228
  $result->set_headers(
229
  array(
230
- 'Cache-Control' => 'max-age=3600, s-max-age=3600',
 
231
  'Content-Type' => 'application/json',
232
  )
233
  );
@@ -271,7 +272,11 @@ if ( ! class_exists( 'DLM_Reports' ) ) {
271
  global $wpdb;
272
 
273
  if ( ! DLM_Logging::is_logging_enabled() || ! DLM_Utils::table_checker( $wpdb->dlm_reports ) ) {
274
- return array();
 
 
 
 
275
  }
276
 
277
  $cache_key = 'dlm_insights_users';
@@ -299,7 +304,8 @@ if ( ! class_exists( 'DLM_Reports' ) ) {
299
  'offset' => ( $this->php_info['retrieved_rows'] === count( $downloads ) ) ? $offset + 1 : '',
300
  'done' => ( $this->php_info['retrieved_rows'] > count( $downloads ) ) ? true : false,
301
  );
302
- wp_cache_set( $cache_key, $user_reports, 'dlm_reports_page', 12 * HOUR_IN_SECONDS );
 
303
  }
304
 
305
  return $user_reports;
@@ -319,10 +325,9 @@ if ( ! class_exists( 'DLM_Reports' ) ) {
319
  return array();
320
  }
321
 
322
- $cache_key = 'dlm_insights_users';
323
  $users_data = array();
 
324
  $stats = wp_cache_get( $cache_key, 'dlm_user_data' );
325
-
326
  if ( ! $stats ) {
327
  $users = get_users();
328
  foreach ( $users as $user ) {
@@ -336,6 +341,7 @@ if ( ! class_exists( 'DLM_Reports' ) ) {
336
  'role' => ( ( ! in_array( 'administrator', $user->roles, true ) ) ? $user->roles : '' ),
337
  );
338
  }
 
339
  wp_cache_set( $cache_key, $user_data, 'dlm_user_data', 12 * HOUR_IN_SECONDS );
340
  }
341
  return $users_data;
@@ -367,6 +373,10 @@ if ( ! class_exists( 'DLM_Reports' ) ) {
367
  $value = 'off';
368
  }
369
 
 
 
 
 
370
  update_option( $option, $value );
371
  die();
372
  }
227
 
228
  $result->set_headers(
229
  array(
230
+ // @todo : comment this and if people complain about the performance, we can add it back.
231
+ //'Cache-Control' => 'max-age=3600, s-max-age=3600',
232
  'Content-Type' => 'application/json',
233
  )
234
  );
272
  global $wpdb;
273
 
274
  if ( ! DLM_Logging::is_logging_enabled() || ! DLM_Utils::table_checker( $wpdb->dlm_reports ) ) {
275
+ return array(
276
+ 'logs' => array(),
277
+ 'offset' => 1,
278
+ 'done' => true,
279
+ );
280
  }
281
 
282
  $cache_key = 'dlm_insights_users';
304
  'offset' => ( $this->php_info['retrieved_rows'] === count( $downloads ) ) ? $offset + 1 : '',
305
  'done' => ( $this->php_info['retrieved_rows'] > count( $downloads ) ) ? true : false,
306
  );
307
+
308
+ wp_cache_set( $cache_key, $user_reports, 'dlm_user_reports', 12 * HOUR_IN_SECONDS );
309
  }
310
 
311
  return $user_reports;
325
  return array();
326
  }
327
 
 
328
  $users_data = array();
329
+ $cache_key = 'dlm_insights_users';
330
  $stats = wp_cache_get( $cache_key, 'dlm_user_data' );
 
331
  if ( ! $stats ) {
332
  $users = get_users();
333
  foreach ( $users as $user ) {
341
  'role' => ( ( ! in_array( 'administrator', $user->roles, true ) ) ? $user->roles : '' ),
342
  );
343
  }
344
+
345
  wp_cache_set( $cache_key, $user_data, 'dlm_user_data', 12 * HOUR_IN_SECONDS );
346
  }
347
  return $users_data;
373
  $value = 'off';
374
  }
375
 
376
+ if ( isset( $_POST['value'] ) ) {
377
+ $value = sanitize_text_field( wp_unslash( $_POST['value'] ) );
378
+ }
379
+
380
  update_option( $option, $value );
381
  die();
382
  }
src/Admin/Reports/components/php-components/top-downloads-footer.php CHANGED
@@ -6,10 +6,10 @@
6
  </table>
7
  <div class="total_downloads_table_footer">
8
  <div class="downloads-block-navigation">
 
9
  <button class='dashicons dashicons-arrow-left-alt2 hidden' disabled='disabled' data-limit="15"
10
  title='Previous 15 downloads'></button>
11
  <button class='dashicons dashicons-arrow-right-alt2 hidden' data-action='load-more' data-offset="1" data-limit="15"
12
  title='Next 15 downloads'></button>
13
  </div>
14
  </div>
15
-
6
  </table>
7
  <div class="total_downloads_table_footer">
8
  <div class="downloads-block-navigation">
9
+ <?php esc_html_e( 'Page:', 'download-monitor' ) ?> <input type="number" value="1" class="dlm-reports-current-page"> <span><?php esc_html_e( 'of', 'download-monitor' ) ?></span> <span class="dlm-reports-total-pages">1</span>
10
  <button class='dashicons dashicons-arrow-left-alt2 hidden' disabled='disabled' data-limit="15"
11
  title='Previous 15 downloads'></button>
12
  <button class='dashicons dashicons-arrow-right-alt2 hidden' data-action='load-more' data-offset="1" data-limit="15"
13
  title='Next 15 downloads'></button>
14
  </div>
15
  </div>
 
src/Admin/Reports/components/php-components/user-logs-footer.php CHANGED
@@ -6,6 +6,7 @@
6
  </table>
7
  <div class="user-downloads-block-navigation">
8
  <div class='downloads-block-navigation'>
 
9
  <button class='dashicons dashicons-arrow-left-alt2 hidden' disabled='disabled' data-limit="15"
10
  title='Previous 15 downloads'></button>
11
  <button class='dashicons dashicons-arrow-right-alt2 hidden' data-action='load-more' data-offset="1" data-limit="15"
6
  </table>
7
  <div class="user-downloads-block-navigation">
8
  <div class='downloads-block-navigation'>
9
+ <?php esc_html_e( 'Page:', 'download-monitor' ) ?> <input type="number" value="1" class="dlm-reports-current-page"> <span><?php esc_html_e( 'of', 'download-monitor' ) ?></span> <span class="dlm-reports-total-pages">1</span>
10
  <button class='dashicons dashicons-arrow-left-alt2 hidden' disabled='disabled' data-limit="15"
11
  title='Previous 15 downloads'></button>
12
  <button class='dashicons dashicons-arrow-right-alt2 hidden' data-action='load-more' data-offset="1" data-limit="15"
src/Admin/Reports/templates/dlm-js-templates.php CHANGED
@@ -8,7 +8,7 @@
8
 
9
  <script type="text/html" id="tmpl-dlm-user-logs-row">
10
  <tr class="dlm-reports-table__line" data-id="{{data.key}}">
11
- <td class="user"><p><a href="{{data.edit_link}}" target="_blank">{{data.user}}</a></p></td>
12
  <td class="ip"><p>{{data.ip}}</p></td>
13
  <td class="role"><p><# if(data.role){ #> {{data.role}} <# } else { #> -- <# } #></p></td>
14
  <td class="download"><p><a href="{{data.edit_download_link}}" target="_blank">{{data.download}}</a></p></td>
8
 
9
  <script type="text/html" id="tmpl-dlm-user-logs-row">
10
  <tr class="dlm-reports-table__line" data-id="{{data.key}}">
11
+ <td class="user"><p><# if( '#' !== data.edit_link){ #><a href="{{data.edit_link}}" target="_blank"> <# } #>{{data.user}}<# if( '#' !== data.edit_link){ #></a><# } #></p></td>
12
  <td class="ip"><p>{{data.ip}}</p></td>
13
  <td class="role"><p><# if(data.role){ #> {{data.role}} <# } else { #> -- <# } #></p></td>
14
  <td class="download"><p><a href="{{data.edit_download_link}}" target="_blank">{{data.download}}</a></p></td>
src/Admin/Settings/Page.php CHANGED
@@ -72,7 +72,7 @@ class DLM_Settings_Page {
72
  }
73
  break;
74
  case 'dlm_redo_upgrade':
75
- if ( $this->redo_upgrade() ) {
76
  wp_redirect( add_query_arg( array( 'dlm_action_done' => $action ), admin_url( 'edit.php?post_type=dlm_download&page=download-monitor-settings&tab=advanced&section=misc' ) ) );
77
  exit;
78
  }
@@ -688,30 +688,6 @@ Deny from all
688
  return false;
689
  }
690
 
691
- /**
692
- * Undocumented function
693
- *
694
- * @return void
695
- */
696
- public function redo_upgrade() {
697
-
698
- global $wp, $wpdb, $pagenow;
699
-
700
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
701
- return false;
702
- }
703
-
704
- // Drop the dlm_reports_log
705
- $drop_statement = "DROP TABLE IF EXISTS {$wpdb->prefix}dlm_reports_log";
706
- $wpdb->query( $drop_statement );
707
-
708
- // Delete upgrade history and set the need DB pgrade
709
- delete_option( 'dlm_db_upgraded' );
710
- set_transient( 'dlm_needs_upgrade', '1', 30 * DAY_IN_SECONDS );
711
-
712
- return true;
713
- }
714
-
715
  /**
716
  * Check if this is Download Monitor's settings page
717
  *
72
  }
73
  break;
74
  case 'dlm_redo_upgrade':
75
+ if ( DLM_Admin_Helper::redo_upgrade() ) {
76
  wp_redirect( add_query_arg( array( 'dlm_action_done' => $action ), admin_url( 'edit.php?post_type=dlm_download&page=download-monitor-settings&tab=advanced&section=misc' ) ) );
77
  exit;
78
  }
688
  return false;
689
  }
690
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
691
  /**
692
  * Check if this is Download Monitor's settings page
693
  *
src/Admin/class-dlm-admin-helper.php CHANGED
@@ -126,4 +126,28 @@ class DLM_Admin_Helper {
126
  return true;
127
  }
128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  }
126
  return true;
127
  }
128
 
129
+ /**
130
+ * Recreates the upgrade environment. Previously declared in DLM_Settings_Page
131
+ *
132
+ * @return bool
133
+ * @since 4.6.4
134
+ */
135
+ public static function redo_upgrade() {
136
+
137
+ global $wp, $wpdb, $pagenow;
138
+
139
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
140
+ return false;
141
+ }
142
+
143
+ // Drop the dlm_reports_log
144
+ $drop_statement = "DROP TABLE IF EXISTS {$wpdb->prefix}dlm_reports_log";
145
+ $wpdb->query( $drop_statement );
146
+
147
+ // Delete upgrade history and set the need DB pgrade
148
+ delete_option( 'dlm_db_upgraded' );
149
+ set_transient( 'dlm_needs_upgrade', '1', 30 * DAY_IN_SECONDS );
150
+
151
+ return true;
152
+ }
153
  }
src/Admin/class-dlm-db-upgrader.php CHANGED
@@ -28,6 +28,9 @@ if ( ! class_exists( 'DLM_DB_Upgrader' ) ) {
28
  */
29
  public function __construct() {
30
 
 
 
 
31
  // Don't do anything if we don't need to or if upgrader already done.
32
  if ( ! self::do_upgrade() ) {
33
 
@@ -89,8 +92,8 @@ if ( ! class_exists( 'DLM_DB_Upgrader' ) ) {
89
  return true;
90
  }
91
 
92
- if ( self::check_if_migrated() ) {
93
- return false;
94
  }
95
 
96
  if ( ! self::version_checker() ) {
@@ -135,15 +138,15 @@ if ( ! class_exists( 'DLM_DB_Upgrader' ) ) {
135
  global $wpdb;
136
  $posts_table = "{$wpdb->prefix}posts";
137
 
138
- if ( ! DLM_Utils::table_checker( $wpdb->download_log ) ) {
 
139
 
 
 
140
  wp_send_json( '0' );
141
  exit;
142
  }
143
 
144
- // Made it here, now let's create the table and start migrating.
145
- $this->create_new_table( $wpdb->dlm_reports );
146
-
147
  $results = $wpdb->get_results( $wpdb->prepare( "SELECT COUNT(dlm_log.ID) as `entries` FROM {$wpdb->download_log} dlm_log INNER JOIN $posts_table dlm_posts ON dlm_log.download_id = dlm_posts.ID" ), ARRAY_A );
148
 
149
  // If there is a transient it means that the import has taken place but did not complete.
@@ -198,6 +201,37 @@ if ( ! class_exists( 'DLM_DB_Upgrader' ) ) {
198
 
199
  // Add uuid column to download_log table.
200
  global $wpdb;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  $alter_statement = "ALTER TABLE {$wpdb->download_log} ADD COLUMN uuid VARCHAR(200) AFTER USER_IP,ADD COLUMN download_location VARCHAR(200) AFTER download_status_message,ADD COLUMN download_category VARCHAR(200) AFTER download_status_message;";
202
  $hash_statement = "UPDATE {$wpdb->download_log} SET uuid = md5(user_ip) WHERE uuid IS NULL;";
203
  // SQL to add index for download_log
@@ -413,7 +447,7 @@ if ( ! class_exists( 'DLM_DB_Upgrader' ) ) {
413
  ?>
414
  <div class="dlm-upgrade-db-notice notice">
415
  <div class="dlm-yellow-band-notice">
416
- <?php echo wp_kses_post( __( 'Please <a href="#" class="dlm-db-upgrade-link">upgrade the database</a> in order to further use Download Monitor\'s Reports page.' ) ); ?>
417
  </div>
418
  <div class="inside">
419
  <div class="main">
@@ -453,5 +487,16 @@ if ( ! class_exists( 'DLM_DB_Upgrader' ) ) {
453
  wp_enqueue_style( 'jquery-ui-style', download_monitor()->get_plugin_url() . '/assets/css/jquery-ui.min.css', array(), DLM_VERSION );
454
  }
455
 
 
 
 
 
 
 
 
 
 
 
 
456
  }
457
  }
28
  */
29
  public function __construct() {
30
 
31
+ // We need to add this because there are scenarios where the user deleted the download_log table.
32
+ add_action( 'admin_init', array( $this, 'recreate_upgrade_process' ), 15, 1 );
33
+
34
  // Don't do anything if we don't need to or if upgrader already done.
35
  if ( ! self::do_upgrade() ) {
36
 
92
  return true;
93
  }
94
 
95
+ if ( ! self::check_if_migrated() ) {
96
+ return true;
97
  }
98
 
99
  if ( ! self::version_checker() ) {
138
  global $wpdb;
139
  $posts_table = "{$wpdb->prefix}posts";
140
 
141
+ // Made it here, now let's create the table and start migrating.
142
+ $this->create_new_table( $wpdb->dlm_reports );
143
 
144
+ // Check if the table exists. User might have deleted it in the past.
145
+ if ( ! DLM_Utils::table_checker( $wpdb->download_log ) ) {
146
  wp_send_json( '0' );
147
  exit;
148
  }
149
 
 
 
 
150
  $results = $wpdb->get_results( $wpdb->prepare( "SELECT COUNT(dlm_log.ID) as `entries` FROM {$wpdb->download_log} dlm_log INNER JOIN $posts_table dlm_posts ON dlm_log.download_id = dlm_posts.ID" ), ARRAY_A );
151
 
152
  // If there is a transient it means that the import has taken place but did not complete.
201
 
202
  // Add uuid column to download_log table.
203
  global $wpdb;
204
+
205
+ // In the event that the user had previously deleted the downlod_log table, we need to create it again.
206
+ if ( ! DLM_Utils::table_checker( $wpdb->download_log ) ) {
207
+ require_once ABSPATH . 'wp-admin/includes/upgrade.php';
208
+
209
+ $dlm_tables = '
210
+ CREATE TABLE `' . $wpdb->prefix . "download_log` (
211
+ ID bigint(20) NOT NULL auto_increment,
212
+ user_id bigint(20) NOT NULL,
213
+ user_ip varchar(200) NOT NULL,
214
+ uuid varchar(200) NOT NULL,
215
+ user_agent varchar(200) NOT NULL,
216
+ download_id bigint(20) NOT NULL,
217
+ version_id bigint(20) NOT NULL,
218
+ version varchar(200) NOT NULL,
219
+ download_date datetime DEFAULT NULL,
220
+ download_status varchar(200) DEFAULT NULL,
221
+ download_status_message varchar(200) DEFAULT NULL,
222
+ download_location varchar(200) DEFAULT NULL,
223
+ download_category varchar(200) DEFAULT NULL,
224
+ meta_data longtext DEFAULT NULL,
225
+ PRIMARY KEY (ID),
226
+ KEY attribute_name (download_id)
227
+ ) $collate;
228
+ ";
229
+
230
+ dbDelta( $dlm_tables );
231
+ wp_send_json( array( 'success' => true ) );
232
+ exit;
233
+ }
234
+
235
  $alter_statement = "ALTER TABLE {$wpdb->download_log} ADD COLUMN uuid VARCHAR(200) AFTER USER_IP,ADD COLUMN download_location VARCHAR(200) AFTER download_status_message,ADD COLUMN download_category VARCHAR(200) AFTER download_status_message;";
236
  $hash_statement = "UPDATE {$wpdb->download_log} SET uuid = md5(user_ip) WHERE uuid IS NULL;";
237
  // SQL to add index for download_log
447
  ?>
448
  <div class="dlm-upgrade-db-notice notice">
449
  <div class="dlm-yellow-band-notice">
450
+ <?php echo wp_kses_post( __( 'Please <a href="#" class="dlm-db-upgrade-link">upgrade the database</a>.' ) ); ?>
451
  </div>
452
  <div class="inside">
453
  <div class="main">
487
  wp_enqueue_style( 'jquery-ui-style', download_monitor()->get_plugin_url() . '/assets/css/jquery-ui.min.css', array(), DLM_VERSION );
488
  }
489
 
490
+ /**
491
+ * Automatically recreate the upgrade environment if the download_log is not present
492
+ *
493
+ * @return false|void
494
+ */
495
+ public function recreate_upgrade_process() {
496
+ global $wpdb;
497
+ if ( ! DLM_Utils::table_checker( $wpdb->download_log ) ) {
498
+ DLM_Admin_Helper::redo_upgrade();
499
+ }
500
+ }
501
  }
502
  }
src/DLM.php CHANGED
@@ -345,6 +345,9 @@ class WP_DLM {
345
  $xhr_data = array_merge( $dlm_xhr_data, $dlm_xhr_security_data );
346
 
347
  wp_add_inline_script('dlm-xhr', 'const dlmXHR = ' . json_encode( $xhr_data ) . '; dlmXHRinstance = {};', 'before');
 
 
 
348
  }
349
 
350
  do_action( 'dlm_frontend_scripts_after' );
345
  $xhr_data = array_merge( $dlm_xhr_data, $dlm_xhr_security_data );
346
 
347
  wp_add_inline_script('dlm-xhr', 'const dlmXHR = ' . json_encode( $xhr_data ) . '; dlmXHRinstance = {};', 'before');
348
+ wp_localize_script('dlm-xhr', 'dlmXHRtranslations', array(
349
+ 'error' => __('An error occurred while trying to download the file. Please try again.', 'download-monitor')
350
+ ));
351
  }
352
 
353
  do_action( 'dlm_frontend_scripts_after' );
src/Download/WordPressDownloadRepository.php CHANGED
@@ -80,12 +80,15 @@ class DLM_WordPress_Download_Repository implements DLM_Download_Repository {
80
  * Retreieve the version download count
81
  *
82
  * @param mixed $version_id
83
- * @return array
84
  */
85
  public function retrieve_download_count( $download_id ) {
86
  global $wpdb;
87
-
88
- $download_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s AND {$wpdb->download_log}.download_status IN ( 'completed', 'redirected' );", $download_id ) );
 
 
 
89
 
90
  return apply_filters( 'dlm_add_meta_download_count', $download_count, $download_id );
91
  }
@@ -95,24 +98,34 @@ class DLM_WordPress_Download_Repository implements DLM_Download_Repository {
95
  *
96
  * @param mixed $version_id
97
  *
98
- * @return array
99
  */
100
  public function retrieve_total_download_count( $download_id ) {
101
  global $wpdb;
 
 
 
 
 
102
 
103
- return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s;", $download_id ) );
104
  }
105
 
106
  /**
107
  * Retreieve the version download count
108
  *
109
  * @param mixed $version_id
110
- * @return array
111
  */
112
  public function retrieve_completed_download_count( $download_id ) {
113
  global $wpdb;
 
 
 
 
 
114
 
115
- return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s AND {$wpdb->download_log}.download_status = 'completed' ;", $download_id ) );
116
 
117
  }
118
 
@@ -124,8 +137,13 @@ class DLM_WordPress_Download_Repository implements DLM_Download_Repository {
124
  */
125
  public function retrieve_redirected_download_count( $download_id ) {
126
  global $wpdb;
 
 
 
 
 
127
 
128
- return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s AND {$wpdb->download_log}.download_status = 'redirected';", $download_id ) );
129
 
130
  }
131
 
@@ -133,12 +151,17 @@ class DLM_WordPress_Download_Repository implements DLM_Download_Repository {
133
  * Retreieve the version download count
134
  *
135
  * @param mixed $version_id
136
- * @return array
137
  */
138
  public function retrieve_failed_download_count( $download_id ) {
139
  global $wpdb;
 
 
 
 
 
140
 
141
- return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s AND {$wpdb->download_log}.download_status = 'failed';", $download_id ) );
142
 
143
  }
144
 
@@ -146,26 +169,34 @@ class DLM_WordPress_Download_Repository implements DLM_Download_Repository {
146
  * Retreieve the version download count
147
  *
148
  * @param mixed $version_id
149
- * @return array
150
  */
151
  public function retrieve_logged_in_downloads( $download_id ) {
152
  global $wpdb;
 
 
 
 
 
153
 
154
- return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s AND {$wpdb->download_log}.user_id != '0';", $download_id ) );
155
-
156
  }
157
 
158
  /**
159
  * Retreieve the version download count
160
  *
161
  * @param mixed $version_id
162
- * @return array
163
  */
164
  public function retrieve_non_logged_in_downloads( $download_id ) {
165
  global $wpdb;
 
 
 
 
 
166
 
167
- return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s AND {$wpdb->download_log}.user_id = '0';", $download_id ) );
168
-
169
  }
170
 
171
  /**
@@ -189,15 +220,16 @@ class DLM_WordPress_Download_Repository implements DLM_Download_Repository {
189
 
190
  $q = new WP_Query();
191
 
192
- $filters = $this->filter_query_args( $filters, $limit, $offset );
193
  /**
194
  * Add arguments to query before querying
195
  * @hooked ( DLM_Backwards_Compatibility, orderby_compatibility )
196
- *
197
  * @since 4.6.0
198
  */
199
  do_action( 'dlm_query_args', $filters );
200
 
 
 
201
  $posts = $q->query( $filters );
202
 
203
  $items = $this->create_downloads_from_array( $posts );
80
  * Retreieve the version download count
81
  *
82
  * @param mixed $version_id
83
+ * @return string
84
  */
85
  public function retrieve_download_count( $download_id ) {
86
  global $wpdb;
87
+ $download_count = 0;
88
+ // Check to see if the table exists first.
89
+ if ( DLM_Utils::table_checker( $wpdb->download_log ) ) {
90
+ $download_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s AND {$wpdb->download_log}.download_status IN ( 'completed', 'redirected' );", $download_id ) );
91
+ }
92
 
93
  return apply_filters( 'dlm_add_meta_download_count', $download_count, $download_id );
94
  }
98
  *
99
  * @param mixed $version_id
100
  *
101
+ * @return string
102
  */
103
  public function retrieve_total_download_count( $download_id ) {
104
  global $wpdb;
105
+ $download_count = 0;
106
+ // Check to see if the table exists first.
107
+ if ( DLM_Utils::table_checker( $wpdb->download_log ) ) {
108
+ $download_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s;", $download_id ) );
109
+ }
110
 
111
+ return $download_count;
112
  }
113
 
114
  /**
115
  * Retreieve the version download count
116
  *
117
  * @param mixed $version_id
118
+ * @return string
119
  */
120
  public function retrieve_completed_download_count( $download_id ) {
121
  global $wpdb;
122
+ $download_count = 0;
123
+ // Check to see if the table exists first.
124
+ if ( DLM_Utils::table_checker( $wpdb->download_log ) ) {
125
+ $download_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s AND {$wpdb->download_log}.download_status = 'completed' ;", $download_id ) );
126
+ }
127
 
128
+ return $download_count;
129
 
130
  }
131
 
137
  */
138
  public function retrieve_redirected_download_count( $download_id ) {
139
  global $wpdb;
140
+ $download_count = 0;
141
+ // Check to see if the table exists first.
142
+ if ( DLM_Utils::table_checker( $wpdb->download_log ) ) {
143
+ $download_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s AND {$wpdb->download_log}.download_status = 'redirected';", $download_id ) );
144
+ }
145
 
146
+ return $download_count;
147
 
148
  }
149
 
151
  * Retreieve the version download count
152
  *
153
  * @param mixed $version_id
154
+ * @return string
155
  */
156
  public function retrieve_failed_download_count( $download_id ) {
157
  global $wpdb;
158
+ $download_count = 0;
159
+ // Check to see if the table exists first.
160
+ if ( DLM_Utils::table_checker( $wpdb->download_log ) ) {
161
+ $download_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s AND {$wpdb->download_log}.download_status = 'failed';", $download_id ) );
162
+ }
163
 
164
+ return $download_count;
165
 
166
  }
167
 
169
  * Retreieve the version download count
170
  *
171
  * @param mixed $version_id
172
+ * @return string
173
  */
174
  public function retrieve_logged_in_downloads( $download_id ) {
175
  global $wpdb;
176
+ $download_count = 0;
177
+ // Check to see if the table exists first.
178
+ if ( DLM_Utils::table_checker( $wpdb->download_log ) ) {
179
+ $download_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s AND {$wpdb->download_log}.user_id != '0';", $download_id ) );
180
+ }
181
 
182
+ return $download_count;
 
183
  }
184
 
185
  /**
186
  * Retreieve the version download count
187
  *
188
  * @param mixed $version_id
189
+ * @return string
190
  */
191
  public function retrieve_non_logged_in_downloads( $download_id ) {
192
  global $wpdb;
193
+ $download_count = 0;
194
+ // Check to see if the table exists first.
195
+ if ( DLM_Utils::table_checker( $wpdb->download_log ) ) {
196
+ $download_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`ID`) FROM {$wpdb->download_log} WHERE download_id = %s AND {$wpdb->download_log}.user_id = '0';", $download_id ) );
197
+ }
198
 
199
+ return $download_count;
 
200
  }
201
 
202
  /**
220
 
221
  $q = new WP_Query();
222
 
 
223
  /**
224
  * Add arguments to query before querying
225
  * @hooked ( DLM_Backwards_Compatibility, orderby_compatibility )
226
+ *
227
  * @since 4.6.0
228
  */
229
  do_action( 'dlm_query_args', $filters );
230
 
231
+ $filters = $this->filter_query_args( $filters, $limit, $offset );
232
+
233
  $posts = $q->query( $filters );
234
 
235
  $items = $this->create_downloads_from_array( $posts );
src/DownloadHandler.php CHANGED
@@ -193,8 +193,22 @@ class DLM_Download_Handler {
193
  $wp->query_vars[ $this->endpoint ] = sanitize_text_field( wp_unslash( $_GET[ $this->endpoint ] ) );
194
  }
195
 
 
 
 
 
 
 
 
 
 
 
196
  // check if endpoint is set but is empty.
197
  if ( apply_filters( 'dlm_empty_download_redirect_enabled', true ) && isset( $wp->query_vars[ $this->endpoint ] ) && empty( $wp->query_vars[ $this->endpoint ] ) ) {
 
 
 
 
198
  wp_redirect( apply_filters( 'dlm_empty_download_redirect_url', home_url() ) );
199
  exit;
200
  }
@@ -242,6 +256,10 @@ class DLM_Download_Handler {
242
 
243
  // Check if allowed
244
  if ( false == $allowed ) {
 
 
 
 
245
  wp_redirect( apply_filters( 'dlm_hotlink_redirect', home_url(), $download_id ) );
246
  exit;
247
  }
@@ -250,15 +268,26 @@ class DLM_Download_Handler {
250
 
251
  /** @var DLM_Download $download */
252
  $download = null;
 
253
  if ( $download_id > 0 ) {
254
  try {
255
  $download = download_monitor()->service( 'download_repository' )->retrieve_single( $download_id );
256
  } catch ( Exception $e ) {
 
 
 
 
 
257
  wp_die( esc_html__( 'Download does not exist.', 'download-monitor' ) . ' <a href="' . esc_url( home_url() ) . '">' . esc_html__( 'Go to homepage &rarr;', 'download-monitor' ) . '</a>', esc_html__( 'Download Error', 'download-monitor' ), array( 'response' => 404 ) );
258
  }
259
  }
260
 
261
  if ( ! $download ) {
 
 
 
 
 
262
  wp_die( esc_html__( 'Download does not exist.', 'download-monitor' ) . ' <a href="' . esc_url( home_url() ) . '">' . esc_html__( 'Go to homepage &rarr;', 'download-monitor' ) . '</a>', esc_html__( 'Download Error', 'download-monitor' ), array( 'response' => 404 ) );
263
  }
264
 
@@ -282,27 +311,24 @@ class DLM_Download_Handler {
282
  }
283
  }
284
 
285
- $def_restricted = array( 'php', 'html', 'htm', 'tmp' );
286
- $restricted_file_types = array_merge( $def_restricted, apply_filters( 'dlm_restricted_file_types', array(), $download ) );
 
287
 
288
- // Do not allow the download of certain file types.
289
- if ( in_array( $download->get_version()->get_filetype(), $restricted_file_types ) ) {
290
- wp_die( esc_html__( 'Download is not allowed for this file type.', 'download-monitor' ) . ' <a href="' . esc_url( home_url() ) . '">' . esc_html__( 'Go to homepage &rarr;', 'download-monitor' ) . '</a>', esc_html__( 'Download Error', 'download-monitor' ), array( 'response' => 404 ) );
 
 
 
 
 
 
291
  }
292
 
293
  // Action on found download
294
  if ( $download->exists() ) {
295
 
296
- // Check and see if this is an XHR request or a classic request.
297
- if ( isset( $_SERVER['HTTP_DLM_XHR_REQUEST'] ) && 'dlm_XMLHttpRequest' === $_SERVER['HTTP_DLM_XHR_REQUEST'] ) {
298
-
299
- if ( ! isset( $_REQUEST['nonce'] ) ) {
300
- wp_send_json_error( array( 'error' => 'missing_nonce' ) );
301
- }
302
- wp_verify_nonce( $_REQUEST['nonce'], 'dlm_ajax_nonce' );
303
- define( 'DLM_DOING_XHR', true );
304
- }
305
-
306
  if ( post_password_required( $download_id ) ) {
307
  if ( $this->check_for_xhr() ) {
308
  header( 'DLM-Redirect: ' . $download->get_the_download_link() );
@@ -313,8 +339,17 @@ class DLM_Download_Handler {
313
 
314
  $this->trigger( $download );
315
  } elseif ( $redirect = apply_filters( 'dlm_404_redirect', false ) ) {
 
 
 
 
316
  wp_redirect( $redirect );
317
  } else {
 
 
 
 
 
318
  wp_die( esc_html__( 'Download does not exist.', 'download-monitor' ) . ' <a href="' . esc_url( home_url() ) . '">' . esc_html__( 'Go to homepage &rarr;', 'download-monitor' ) . '</a>', esc_html__( 'Download Error', 'download-monitor' ), array( 'response' => 404 ) );
319
  }
320
 
193
  $wp->query_vars[ $this->endpoint ] = sanitize_text_field( wp_unslash( $_GET[ $this->endpoint ] ) );
194
  }
195
 
196
+ // Check and see if this is an XHR request or a classic request.
197
+ if ( isset( $_SERVER['HTTP_DLM_XHR_REQUEST'] ) && 'dlm_XMLHttpRequest' === $_SERVER['HTTP_DLM_XHR_REQUEST'] ) {
198
+
199
+ if ( ! isset( $_REQUEST['nonce'] ) ) {
200
+ wp_send_json_error( array( 'error' => 'missing_nonce' ) );
201
+ }
202
+ wp_verify_nonce( $_REQUEST['nonce'], 'dlm_ajax_nonce' );
203
+ define( 'DLM_DOING_XHR', true );
204
+ }
205
+
206
  // check if endpoint is set but is empty.
207
  if ( apply_filters( 'dlm_empty_download_redirect_enabled', true ) && isset( $wp->query_vars[ $this->endpoint ] ) && empty( $wp->query_vars[ $this->endpoint ] ) ) {
208
+ if ( $this->check_for_xhr() ) {
209
+ header( 'DLM-Redirect: ' . apply_filters( 'dlm_empty_download_redirect_url', home_url() ) );
210
+ exit;
211
+ }
212
  wp_redirect( apply_filters( 'dlm_empty_download_redirect_url', home_url() ) );
213
  exit;
214
  }
256
 
257
  // Check if allowed
258
  if ( false == $allowed ) {
259
+ if ( $this->check_for_xhr() ) {
260
+ header( 'DLM-Redirect: ' . apply_filters( 'dlm_hotlink_redirect', home_url(), $download_id ) );
261
+ exit;
262
+ }
263
  wp_redirect( apply_filters( 'dlm_hotlink_redirect', home_url(), $download_id ) );
264
  exit;
265
  }
268
 
269
  /** @var DLM_Download $download */
270
  $download = null;
271
+ $version = null;
272
  if ( $download_id > 0 ) {
273
  try {
274
  $download = download_monitor()->service( 'download_repository' )->retrieve_single( $download_id );
275
  } catch ( Exception $e ) {
276
+ if ( $this->check_for_xhr() ) {
277
+ header( 'DLM-Error: ' . esc_html__( 'Download does not exist.', 'download-monitor' ) );
278
+ http_response_code( 404 );
279
+ exit;
280
+ }
281
  wp_die( esc_html__( 'Download does not exist.', 'download-monitor' ) . ' <a href="' . esc_url( home_url() ) . '">' . esc_html__( 'Go to homepage &rarr;', 'download-monitor' ) . '</a>', esc_html__( 'Download Error', 'download-monitor' ), array( 'response' => 404 ) );
282
  }
283
  }
284
 
285
  if ( ! $download ) {
286
+ if ( $this->check_for_xhr() ) {
287
+ header( 'DLM-Error: ' . esc_html__( 'Download does not exist.', 'download-monitor' ) );
288
+ http_response_code( 404 );
289
+ exit;
290
+ }
291
  wp_die( esc_html__( 'Download does not exist.', 'download-monitor' ) . ' <a href="' . esc_url( home_url() ) . '">' . esc_html__( 'Go to homepage &rarr;', 'download-monitor' ) . '</a>', esc_html__( 'Download Error', 'download-monitor' ), array( 'response' => 404 ) );
292
  }
293
 
311
  }
312
  }
313
 
314
+ if ( ! ( $download->is_redirect_only() || apply_filters( 'dlm_do_not_force', false, $download, $version ) ) ) {
315
+ $def_restricted = array( 'php', 'html', 'htm', 'tmp' );
316
+ $restricted_file_types = array_merge( $def_restricted, apply_filters( 'dlm_restricted_file_types', array(), $download ) );
317
 
318
+ // Do not allow the download of certain file types.
319
+ if ( in_array( $download->get_version()->get_filetype(), $restricted_file_types ) ) {
320
+ if ( $this->check_for_xhr() ) {
321
+ header( 'DLM-Error: ' . esc_html__( 'Download is not allowed for this file type.', 'download-monitor' ) );
322
+ http_response_code( 403 );
323
+ exit;
324
+ }
325
+ wp_die( esc_html__( 'Download is not allowed for this file type.', 'download-monitor' ) . ' <a href="' . esc_url( home_url() ) . '">' . esc_html__( 'Go to homepage &rarr;', 'download-monitor' ) . '</a>', esc_html__( 'Download Error', 'download-monitor' ), array( 'response' => 404 ) );
326
+ }
327
  }
328
 
329
  // Action on found download
330
  if ( $download->exists() ) {
331
 
 
 
 
 
 
 
 
 
 
 
332
  if ( post_password_required( $download_id ) ) {
333
  if ( $this->check_for_xhr() ) {
334
  header( 'DLM-Redirect: ' . $download->get_the_download_link() );
339
 
340
  $this->trigger( $download );
341
  } elseif ( $redirect = apply_filters( 'dlm_404_redirect', false ) ) {
342
+ if ( $this->check_for_xhr() ) {
343
+ header( 'DLM-Redirect: ' . $redirect );
344
+ exit;
345
+ }
346
  wp_redirect( $redirect );
347
  } else {
348
+ if ( $this->check_for_xhr() ) {
349
+ header( 'DLM-Error: ' . esc_html__( 'Download does not exist.', 'download-monitor' ) );
350
+ http_response_code( 404 );
351
+ exit;
352
+ }
353
  wp_die( esc_html__( 'Download does not exist.', 'download-monitor' ) . ' <a href="' . esc_url( home_url() ) . '">' . esc_html__( 'Go to homepage &rarr;', 'download-monitor' ) . '</a>', esc_html__( 'Download Error', 'download-monitor' ), array( 'response' => 404 ) );
354
  }
355
 
src/Integrations/PostTypesOrder.php CHANGED
@@ -6,7 +6,7 @@ class DLM_Integrations_PostTypesOrder {
6
  * Setup integration
7
  */
8
  public function setup() {
9
- add_filter( 'dlm_admin_dashboard_popular_downloads_filters', array( $this, 'ignore_popular_downloads_order' ), 10, 2 );
10
  }
11
 
12
  /**
6
  * Setup integration
7
  */
8
  public function setup() {
9
+ add_filter( 'dlm_admin_dashboard_popular_downloads_filters', array( $this, 'ignore_popular_downloads_order' ), 10, 1 );
10
  }
11
 
12
  /**
src/Logs/LogItem.php CHANGED
@@ -303,6 +303,11 @@ class DLM_Log_Item {
303
  public function increase_download_count() {
304
  global $wpdb;
305
 
 
 
 
 
 
306
  $user_id = 0;
307
  $download_date = '';
308
 
@@ -310,7 +315,7 @@ class DLM_Log_Item {
310
  $user_id = get_current_user_id();
311
  }
312
 
313
- $download_date = current_time( 'mysql' );
314
 
315
  // Add filters for download_log column entries, so in case the upgrader failed we can still log the download.
316
  /**
303
  public function increase_download_count() {
304
  global $wpdb;
305
 
306
+ // If there is no table we don't need to increase the download count as it will trigger an error.
307
+ if ( ! DLM_Utils::table_checker( $wpdb->download_log ) ) {
308
+ return;
309
+ }
310
+
311
  $user_id = 0;
312
  $download_date = '';
313
 
315
  $user_id = get_current_user_id();
316
  }
317
 
318
+ $download_date = current_time( 'mysql', false );
319
 
320
  // Add filters for download_log column entries, so in case the upgrader failed we can still log the download.
321
  /**
src/Logs/WordPressLogItemRepository.php CHANGED
@@ -119,6 +119,7 @@ class DLM_WordPress_Log_Item_Repository implements DLM_Log_Item_Repository {
119
  }
120
  }
121
 
 
122
  return $items;
123
  }
124
 
@@ -143,7 +144,7 @@ class DLM_WordPress_Log_Item_Repository implements DLM_Log_Item_Repository {
143
  $wpdb->hide_errors();
144
 
145
  // Set the log date. Should be current date, as logs will be separated by dates.
146
- $log_date = date( 'Y-m-d' );
147
 
148
  //Check first if the table exists, db upgrade process might have failed.
149
  if ( DLM_Utils::table_checker( $wpdb->dlm_reports ) ) {
119
  }
120
  }
121
 
122
+
123
  return $items;
124
  }
125
 
144
  $wpdb->hide_errors();
145
 
146
  // Set the log date. Should be current date, as logs will be separated by dates.
147
+ $log_date = current_time( 'Y-m-d', false );
148
 
149
  //Check first if the table exists, db upgrade process might have failed.
150
  if ( DLM_Utils::table_checker( $wpdb->dlm_reports ) ) {
src/Version/WordPressVersionRepository.php CHANGED
@@ -79,14 +79,17 @@ class DLM_WordPress_Version_Repository implements DLM_Version_Repository {
79
  * Retreieve the version download count
80
  *
81
  * @param mixed $version_id
82
- * @return array
83
  */
84
  public function retrieve_version_download_count( $version_id ) {
85
  global $wpdb;
 
 
 
 
 
86
 
87
- $download_counts = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->download_log} WHERE version_id = %s AND download_status IN ( 'completed','redirected' )", $version_id ) );
88
-
89
- return apply_filters( 'dlm_add_version_meta_download_count', $download_counts, $version_id );
90
  }
91
 
92
  /**
79
  * Retreieve the version download count
80
  *
81
  * @param mixed $version_id
82
+ * @return string
83
  */
84
  public function retrieve_version_download_count( $version_id ) {
85
  global $wpdb;
86
+ $download_count = 0;
87
+ // Check to see if the table exists first.
88
+ if ( DLM_Utils::table_checker( $wpdb->download_log ) ) {
89
+ $download_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->download_log} WHERE version_id = %s AND download_status IN ( 'completed','redirected' )", $version_id ) );
90
+ }
91
 
92
+ return apply_filters( 'dlm_add_version_meta_download_count', $download_count, $version_id );
 
 
93
  }
94
 
95
  /**