Download Monitor - Version 4.7.4

Version Description

  • 21.11.2022 = Fix: Sorting by download count did not take into consideration the post meta ( #1126 ) Fix: Reports Downloads CPT retrieval ( #1128 ) Fix: Storing IP setting not working ( #1124 ) Fix: Visual indicator for buttons and non-content headers ( #1119 ) Changed: Reports display dates are now based on the Date Format and Time Format settings ( #516 ) Added: Option to set category in the Downloads list widget ( #659 ) Fixed: Exclude multiple tags in [downloads] shortcode ( #660 ) Change: Set cookies "secure" flag based on server configuration ( #687 ) Fixed: Bedrock installations redirect to file bug ( #973 ) Fixed: Conflict between WPML and Download CPT REST APIs ( #1118 ) Fixed: Incompatiblity with WPML when languages added as parameter ( #1112 ) Fixed: Safari compatibility for filenames ( #1125 ) Changed: Upsell system for plugins page ( #875 ) Added: Popup for no-access message ( #686 ) Added: Option to display the "No access" message in a popup( modal ) ( #686 ) Fixed: Redirect to file when from uploads / uploadsis a symlink ( #1100 )
Download this release

Release Info

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

Code changes from version 4.7.3 to 4.7.4

Files changed (55) hide show
  1. assets/css/admin.css +52 -1
  2. assets/css/admin.less +88 -2
  3. assets/css/admin.min.css +1 -1
  4. assets/css/frontend.css +83 -0
  5. assets/css/frontend.less +100 -0
  6. assets/css/frontend.min.css +1 -1
  7. assets/images/features/content-grouping.png +0 -0
  8. assets/images/features/customisable-endpoints.png +0 -0
  9. assets/images/features/data-importing-exporting.png +0 -0
  10. assets/images/features/downloading-page.png +0 -0
  11. assets/images/features/enforce-download-limits.png +0 -0
  12. assets/images/features/gated-content.png +0 -0
  13. assets/images/features/instant-notifications.png +0 -0
  14. assets/images/features/link-downloads-from-cloud.png +0 -0
  15. assets/images/features/monetize-your-downloads.png +0 -0
  16. assets/images/features/page-addon.png +0 -0
  17. assets/images/features/spam-protection.png +0 -0
  18. assets/images/features/track-your-content.png +0 -0
  19. assets/js/dlm-xhr.js +67 -3
  20. assets/js/dlm-xhr.min.js +1 -1
  21. assets/js/edit-download.js +14 -0
  22. assets/js/edit-download.min.js +1 -1
  23. assets/js/onboarding.js +4 -0
  24. assets/js/onboarding.min.js +1 -1
  25. assets/js/reports/reports.js +50 -14
  26. assets/js/reports/reports.min.js +1 -1
  27. assets/js/select2/select2.min.css +1 -1
  28. assets/js/select2/select2.min.js +2 -1
  29. changelog.txt +17 -0
  30. download-monitor.php +2 -2
  31. includes/admin/class-dlm-upsells.php +13 -7
  32. includes/admin/class-dlm-welcome.php +222 -49
  33. includes/backwards-compatibility/class-dlm-backwards-compatibility.php +3 -4
  34. includes/submodules/banner/assets/css/wpchill-welcome.css +251 -111
  35. includes/submodules/banner/assets/img/welcome_header_bg.png +0 -0
  36. includes/submodules/banner/assets/img/welcome_header_laptop.png +0 -0
  37. includes/submodules/banner/class-wpchill-welcome.php +45 -38
  38. includes/tracking/class-download-monitor-usage-tracker.php +7 -0
  39. readme.txt +19 -1
  40. src/Admin/Extensions.php +116 -54
  41. src/Admin/Reports/Page.php +2 -0
  42. src/Admin/Reports/class-dlm-reports.php +35 -2
  43. src/Admin/Settings/Settings.php +10 -2
  44. src/Admin/class-dlm-db-upgrader.php +1 -1
  45. src/AjaxHandler.php +99 -0
  46. src/CookieManager.php +20 -9
  47. src/DLM.php +15 -5
  48. src/Download/Download.php +20 -0
  49. src/Download/WordPressDownloadRepository.php +8 -1
  50. src/DownloadHandler.php +84 -25
  51. src/Logs/LogFilters.php +67 -0
  52. src/Shortcodes.php +8 -7
  53. src/Widgets/Downloads.php +121 -80
  54. vendor/composer/autoload_classmap.php +1 -0
  55. vendor/composer/autoload_static.php +1 -0
assets/css/admin.css CHANGED
@@ -2158,10 +2158,22 @@ table.wp-list-table .column-thumb img {
2158
  .dlm_extensions_wrap #available-extensions {
2159
  clear: both;
2160
  }
 
 
 
2161
  .dlm_extensions_wrap .dlm_extensions {
2162
- padding: 15px 0;
2163
  overflow: hidden;
2164
  }
 
 
 
 
 
 
 
 
 
2165
  .dlm_extensions_wrap .dlm_extensions .dlm_extension {
2166
  background-color: #FFF;
2167
  width: calc(20% - 15px);
@@ -2315,6 +2327,14 @@ table.wp-list-table .column-thumb img {
2315
  margin: 5px auto;
2316
  margin-left: 15px;
2317
  }
 
 
 
 
 
 
 
 
2318
  #total_downloads_browser_table a.nav-tab {
2319
  text-transform: capitalize;
2320
  }
@@ -2915,3 +2935,34 @@ Toggles
2915
  padding: 0 !important;
2916
  outline: none;
2917
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2158
  .dlm_extensions_wrap #available-extensions {
2159
  clear: both;
2160
  }
2161
+ .dlm_extensions_wrap #available-extensions .features .feature-list .feature-block a {
2162
+ color: #fff;
2163
+ }
2164
  .dlm_extensions_wrap .dlm_extensions {
2165
+ padding: 0;
2166
  overflow: hidden;
2167
  }
2168
+ .dlm_extensions_wrap .dlm_extensions #wpchill-welcome .feature-list {
2169
+ margin-top: 10px;
2170
+ margin-left: -15px;
2171
+ margin-right: -15px;
2172
+ }
2173
+ .dlm_extensions_wrap .dlm_extensions #wpchill-welcome .feature-block {
2174
+ margin: 10px;
2175
+ width: calc(33% - 20px) !important;
2176
+ }
2177
  .dlm_extensions_wrap .dlm_extensions .dlm_extension {
2178
  background-color: #FFF;
2179
  width: calc(20% - 15px);
2327
  margin: 5px auto;
2328
  margin-left: 15px;
2329
  }
2330
+ #installed-extensions #wpchill-welcome .features .feature-list .feature-block {
2331
+ margin: 10px;
2332
+ width: calc(33% - 20px) !important;
2333
+ min-height: 400px;
2334
+ }
2335
+ #installed-extensions #wpchill-welcome .features .feature-list a {
2336
+ color: #fff;
2337
+ }
2338
  #total_downloads_browser_table a.nav-tab {
2339
  text-transform: capitalize;
2340
  }
2935
  padding: 0 !important;
2936
  outline: none;
2937
  }
2938
+ .guide-button a:hover {
2939
+ background-color: #fff !important;
2940
+ color: #2271b1 !important;
2941
+ }
2942
+ #wpchill-welcome .welcome-header .feature-list .block {
2943
+ padding: 20px 20px 0px 0px;
2944
+ }
2945
+ #wpchill-welcome .pages-creation .block {
2946
+ padding: 0 20px;
2947
+ }
2948
+ #wpchill-welcome .pages-creation .pages-creation__buttons {
2949
+ box-shadow: none !important;
2950
+ }
2951
+ #wpchill-welcome .pages-creation .pages-creation__buttons .block {
2952
+ padding: 20px 20px 0px 0px;
2953
+ box-shadow: none !important;
2954
+ }
2955
+ #wpchill-welcome .pages-creation .pages-creation__buttons .guide-button a:hover {
2956
+ background-color: #2271b1 !important;
2957
+ color: #fff !important;
2958
+ }
2959
+ #wpchill-welcome .pages-creation .block {
2960
+ padding: 0 20px;
2961
+ }
2962
+ #wpchill-welcome .pages-creation .pages-creation__buttons {
2963
+ box-shadow: none;
2964
+ }
2965
+ #wpchill-welcome .pages-creation .pages-creation__buttons .block {
2966
+ padding: 20px 20px 0px 0px;
2967
+ box-shadow: none;
2968
+ }
assets/css/admin.less CHANGED
@@ -2390,12 +2390,35 @@ table.wp-list-table {
2390
 
2391
  #available-extensions {
2392
  clear: both;
 
 
 
 
 
 
 
 
 
2393
  }
2394
 
2395
  .dlm_extensions {
2396
- padding: 15px 0;
2397
  overflow: hidden;
2398
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2399
  .dlm_extension {
2400
 
2401
  background-color: #FFF;
@@ -2594,7 +2617,22 @@ table.wp-list-table {
2594
  }
2595
  }
2596
  }
2597
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2598
  #total_downloads_browser_table {
2599
  a.nav-tab {
2600
  text-transform: capitalize;
@@ -3309,4 +3347,52 @@ Toggles
3309
  width: 0;
3310
  padding: 0 !important;
3311
  outline: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3312
  }
2390
 
2391
  #available-extensions {
2392
  clear: both;
2393
+ .features {
2394
+ .feature-list {
2395
+ .feature-block {
2396
+ a {
2397
+ color:#fff;
2398
+ }
2399
+ }
2400
+ }
2401
+ }
2402
  }
2403
 
2404
  .dlm_extensions {
2405
+ padding: 0;
2406
  overflow: hidden;
2407
 
2408
+ #wpchill-welcome {
2409
+
2410
+ .feature-list {
2411
+ margin-top: 10px;
2412
+ margin-left: -15px;
2413
+ margin-right: -15px;
2414
+ }
2415
+
2416
+ .feature-block {
2417
+ margin:10px;
2418
+ width:calc(33% - 20px) !important;
2419
+ }
2420
+ }
2421
+
2422
  .dlm_extension {
2423
 
2424
  background-color: #FFF;
2617
  }
2618
  }
2619
  }
2620
+ #installed-extensions {
2621
+ #wpchill-welcome {
2622
+ .features {
2623
+ .feature-list {
2624
+ .feature-block {
2625
+ margin:10px;
2626
+ width:calc(33% - 20px) !important;
2627
+ min-height:400px;
2628
+ }
2629
+ a{
2630
+ color: #fff;
2631
+ }
2632
+ }
2633
+ }
2634
+ }
2635
+ }
2636
  #total_downloads_browser_table {
2637
  a.nav-tab {
2638
  text-transform: capitalize;
3347
  width: 0;
3348
  padding: 0 !important;
3349
  outline: none;
3350
+ }
3351
+
3352
+ .guide-button {
3353
+ a {
3354
+ &:hover {
3355
+ background-color: #fff !important;
3356
+ color:#2271b1 !important;
3357
+ }
3358
+ }
3359
+ }
3360
+
3361
+ #wpchill-welcome .welcome-header .feature-list .block {
3362
+ padding: 20px 20px 0px 0px;
3363
+ }
3364
+
3365
+ #wpchill-welcome .pages-creation .block {
3366
+ padding: 0 20px;
3367
+ }
3368
+
3369
+ #wpchill-welcome .pages-creation .pages-creation__buttons {
3370
+ box-shadow: none !important;
3371
+ }
3372
+
3373
+ #wpchill-welcome .pages-creation .pages-creation__buttons .block {
3374
+ padding: 20px 20px 0px 0px;
3375
+ box-shadow: none !important;
3376
+ }
3377
+
3378
+ #wpchill-welcome .pages-creation .pages-creation__buttons .guide-button {
3379
+ a {
3380
+ &:hover {
3381
+ background-color: #2271b1 !important;
3382
+ color: #fff !important;
3383
+ }
3384
+ }
3385
+ }
3386
+
3387
+ #wpchill-welcome .pages-creation .block {
3388
+ padding: 0 20px;
3389
+ }
3390
+
3391
+ #wpchill-welcome .pages-creation .pages-creation__buttons {
3392
+ box-shadow: none;
3393
+ }
3394
+
3395
+ #wpchill-welcome .pages-creation .pages-creation__buttons .block {
3396
+ padding: 20px 20px 0px 0px;
3397
+ box-shadow: none;
3398
  }
assets/css/admin.min.css CHANGED
@@ -1 +1 @@
1
- .post-type-dlm_download .dlm-page-header{border-bottom:1px solid #ccc;padding:15px 20px;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 .downloadable_files .downloadable_file .wpchill-tooltip{float:none}#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 20px 0 0;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}.dlm-copy-shortcode-input{border:0!important;width:0;padding:0!important;outline:0}
1
+ .post-type-dlm_download .dlm-page-header{border-bottom:1px solid #ccc;padding:15px 20px;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 .downloadable_files .downloadable_file .wpchill-tooltip{float:none}#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 20px 0 0;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 #available-extensions .features .feature-list .feature-block a{color:#fff}.dlm_extensions_wrap .dlm_extensions{padding:0;overflow:hidden}.dlm_extensions_wrap .dlm_extensions #wpchill-welcome .feature-list{margin-top:10px;margin-left:-15px;margin-right:-15px}.dlm_extensions_wrap .dlm_extensions #wpchill-welcome .feature-block{margin:10px;width:calc(33% - 20px)!important}.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}#installed-extensions #wpchill-welcome .features .feature-list .feature-block{margin:10px;width:calc(33% - 20px)!important;min-height:400px}#installed-extensions #wpchill-welcome .features .feature-list a{color:#fff}#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}.dlm-copy-shortcode-input{border:0!important;width:0;padding:0!important;outline:0}.guide-button a:hover{background-color:#fff!important;color:#2271b1!important}#wpchill-welcome .welcome-header .feature-list .block{padding:20px 20px 0 0}#wpchill-welcome .pages-creation .block{padding:0 20px}#wpchill-welcome .pages-creation .pages-creation__buttons{box-shadow:none!important}#wpchill-welcome .pages-creation .pages-creation__buttons .block{padding:20px 20px 0 0;box-shadow:none!important}#wpchill-welcome .pages-creation .pages-creation__buttons .guide-button a:hover{background-color:#2271b1!important;color:#fff!important}#wpchill-welcome .pages-creation .block{padding:0 20px}#wpchill-welcome .pages-creation .pages-creation__buttons{box-shadow:none}#wpchill-welcome .pages-creation .pages-creation__buttons .block{padding:20px 20px 0 0;box-shadow:none}
assets/css/frontend.css CHANGED
@@ -267,6 +267,14 @@ nav.download-monitor-pagination ul li a:focus,
267
  transform: rotate(360deg);
268
  }
269
  }
 
 
 
 
 
 
 
 
270
  data.dlm-hidden-info {
271
  position: relative;
272
  }
@@ -337,6 +345,9 @@ html body a.download-button::before {
337
  box-shadow: 0px 0px 3px rgba(255, 0, 0, 0.8);
338
  border-radius: 5px;
339
  }
 
 
 
340
  html body a.download-button.download-10:before {
341
  width: 10%;
342
  }
@@ -451,3 +462,75 @@ html body a.download-link.dlm-download-complete::before {
451
  display: inline-block;
452
  position: relative;
453
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  transform: rotate(360deg);
268
  }
269
  }
270
+ @keyframes infinite-loading {
271
+ from {
272
+ width: 0%;
273
+ }
274
+ to {
275
+ width: 100%;
276
+ }
277
+ }
278
  data.dlm-hidden-info {
279
  position: relative;
280
  }
345
  box-shadow: 0px 0px 3px rgba(255, 0, 0, 0.8);
346
  border-radius: 5px;
347
  }
348
+ html body a.download-button.download-Infinity::before {
349
+ animation: infinite-loading 1s infinite linear;
350
+ }
351
  html body a.download-button.download-10:before {
352
  width: 10%;
353
  }
462
  display: inline-block;
463
  position: relative;
464
  }
465
+ .dlm-no-access-modal-window {
466
+ position: fixed;
467
+ top: 50%;
468
+ left: 50%;
469
+ color: inherit;
470
+ background-color: #fff;
471
+ -webkit-transform: translate(-50%, -50%);
472
+ -moz-transform: translate(-50%, -50%);
473
+ -ms-transform: translate(-50%, -50%);
474
+ -o-transform: translate(-50%, -50%);
475
+ transform: translate(-50%, -50%);
476
+ width: auto;
477
+ min-width: 600px;
478
+ height: auto;
479
+ min-height: 250px;
480
+ box-shadow: rgba(0, 0, 0, 0.45) 0 25px 20px -20px;
481
+ border-radius: 10px;
482
+ max-width: 80%;
483
+ max-height: 90%;
484
+ overflow-y: auto;
485
+ z-index: 99;
486
+ }
487
+ .dlm-no-access-modal-window > * {
488
+ padding: 20px;
489
+ }
490
+ .dlm-no-access-modal-window .dlm-no-access-modal__header {
491
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
492
+ display: flex;
493
+ flex-direction: row;
494
+ width: calc(100% - 40px);
495
+ justify-content: space-between;
496
+ align-items: center;
497
+ clear: both;
498
+ position: relative;
499
+ }
500
+ .dlm-no-access-modal-window .dlm-no-access-modal__body {
501
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
502
+ position: relative;
503
+ }
504
+ .dlm-no-access-modal-window .dlm-no-access-modal__footer {
505
+ text-align: right;
506
+ }
507
+ .dlm-no-access-modal-overlay {
508
+ position: fixed;
509
+ width: 100%;
510
+ height: 100%;
511
+ background-color: #dededea1;
512
+ top: 0;
513
+ z-index: 98;
514
+ }
515
+ .dlm-no-access-modal-close span {
516
+ display: block;
517
+ position: relative;
518
+ text-align: center;
519
+ border-radius: 100px;
520
+ background: #212A2F;
521
+ color: #fff;
522
+ }
523
+ .dlm-no-access-modal-close:hover {
524
+ cursor: pointer;
525
+ }
526
+ /*.dlm-modal-close-icon {
527
+ background-color: #fff;
528
+ -webkit-mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBhcmlhLWhpZGRlbj0idHJ1ZSIgZm9jdXNhYmxlPSJmYWxzZSI+PHBhdGggZD0iTTEyIDEzLjA2bDMuNzEyIDMuNzEzIDEuMDYxLTEuMDZMMTMuMDYxIDEybDMuNzEyLTMuNzEyLTEuMDYtMS4wNkwxMiAxMC45MzggOC4yODggNy4yMjdsLTEuMDYxIDEuMDZMMTAuOTM5IDEybC0zLjcxMiAzLjcxMiAxLjA2IDEuMDYxTDEyIDEzLjA2MXoiPjwvcGF0aD48L3N2Zz4=) no-repeat center;
529
+ mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBhcmlhLWhpZGRlbj0idHJ1ZSIgZm9jdXNhYmxlPSJmYWxzZSI+PHBhdGggZD0iTTEyIDEzLjA2bDMuNzEyIDMuNzEzIDEuMDYxLTEuMDZMMTMuMDYxIDEybDMuNzEyLTMuNzEyLTEuMDYtMS4wNkwxMiAxMC45MzggOC4yODggNy4yMjdsLTEuMDYxIDEuMDZMMTAuOTM5IDEybC0zLjcxMiAzLjcxMiAxLjA2IDEuMDYxTDEyIDEzLjA2MXoiPjwvcGF0aD48L3N2Zz4=) no-repeat center;
530
+ width: 41px;
531
+ height: 43px;
532
+ margin: 0 auto;
533
+ position: relative;
534
+ display: inline-block;
535
+ mask-size: cover;
536
+ }*/
assets/css/frontend.less CHANGED
@@ -216,6 +216,16 @@ nav.download-monitor-pagination, #content nav.download-monitor-pagination {
216
  }
217
  }
218
 
 
 
 
 
 
 
 
 
 
 
219
  data.dlm-hidden-info {
220
  position: relative;
221
  span {
@@ -303,6 +313,12 @@ html body a.download-button{
303
  border-radius:5px;
304
  }
305
 
 
 
 
 
 
 
306
  &.download-10:before {
307
  width: 10%;
308
  }
@@ -446,3 +462,87 @@ html body a.download-link {
446
  display:inline-block;
447
  position:relative;
448
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  }
217
  }
218
 
219
+ @keyframes infinite-loading {
220
+ from {
221
+ width:0%;
222
+ }
223
+
224
+ to {
225
+ width:100%;
226
+ }
227
+ }
228
+
229
  data.dlm-hidden-info {
230
  position: relative;
231
  span {
313
  border-radius:5px;
314
  }
315
 
316
+ &.download-Infinity {
317
+ &::before {
318
+ animation: infinite-loading 1s infinite linear;
319
+ }
320
+ }
321
+
322
  &.download-10:before {
323
  width: 10%;
324
  }
462
  display:inline-block;
463
  position:relative;
464
  }
465
+
466
+ .dlm-no-access-modal-window {
467
+ position: fixed;
468
+ top: 50%;
469
+ left: 50%;
470
+ color: inherit;
471
+ background-color: #fff;
472
+ -webkit-transform: translate(-50%, -50%);
473
+ -moz-transform: translate(-50%, -50%);
474
+ -ms-transform: translate(-50%, -50%);
475
+ -o-transform: translate(-50%, -50%);
476
+ transform: translate(-50%, -50%);
477
+ width:auto;
478
+ min-width: 600px;
479
+ height: auto;
480
+ min-height: 250px;
481
+ box-shadow: rgba(0,0,0,.45) 0 25px 20px -20px;
482
+ border-radius: 10px;
483
+ max-width: 80%;
484
+ max-height: 90%;
485
+ overflow-y: auto;
486
+ z-index: 99;
487
+
488
+ & > * {
489
+ padding: 20px;
490
+ }
491
+
492
+ .dlm-no-access-modal__header {
493
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
494
+ display: flex;
495
+ flex-direction: row;
496
+ width: calc(100% - 40px);
497
+ justify-content: space-between;
498
+ align-items: center;
499
+ clear: both;
500
+ position: relative;
501
+ }
502
+
503
+ .dlm-no-access-modal__body {
504
+ border-bottom:1px solid rgba(0,0,0,0.1);
505
+ position: relative;
506
+ }
507
+
508
+ .dlm-no-access-modal__footer {
509
+ text-align: right;
510
+ }
511
+ }
512
+
513
+ .dlm-no-access-modal-overlay {
514
+ position: fixed;
515
+ width: 100%;
516
+ height: 100%;
517
+ background-color: #dededea1;
518
+ top: 0;
519
+ z-index: 98;
520
+ }
521
+
522
+ .dlm-no-access-modal-close {
523
+
524
+ span {
525
+ display: block;
526
+ position: relative;
527
+ text-align: center;
528
+ border-radius: 100px;
529
+ background: #212A2F;
530
+ color:#fff;
531
+ }
532
+ }
533
+
534
+ .dlm-no-access-modal-close:hover {
535
+ cursor: pointer;
536
+ }
537
+
538
+ /*.dlm-modal-close-icon {
539
+ background-color: #fff;
540
+ -webkit-mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBhcmlhLWhpZGRlbj0idHJ1ZSIgZm9jdXNhYmxlPSJmYWxzZSI+PHBhdGggZD0iTTEyIDEzLjA2bDMuNzEyIDMuNzEzIDEuMDYxLTEuMDZMMTMuMDYxIDEybDMuNzEyLTMuNzEyLTEuMDYtMS4wNkwxMiAxMC45MzggOC4yODggNy4yMjdsLTEuMDYxIDEuMDZMMTAuOTM5IDEybC0zLjcxMiAzLjcxMiAxLjA2IDEuMDYxTDEyIDEzLjA2MXoiPjwvcGF0aD48L3N2Zz4=) no-repeat center;
541
+ mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBhcmlhLWhpZGRlbj0idHJ1ZSIgZm9jdXNhYmxlPSJmYWxzZSI+PHBhdGggZD0iTTEyIDEzLjA2bDMuNzEyIDMuNzEzIDEuMDYxLTEuMDZMMTMuMDYxIDEybDMuNzEyLTMuNzEyLTEuMDYtMS4wNkwxMiAxMC45MzggOC4yODggNy4yMjdsLTEuMDYxIDEuMDZMMTAuOTM5IDEybC0zLjcxMiAzLjcxMiAxLjA2IDEuMDYxTDEyIDEzLjA2MXoiPjwvcGF0aD48L3N2Zz4=) no-repeat center;
542
+ width: 41px;
543
+ height: 43px;
544
+ margin: 0 auto;
545
+ position: relative;
546
+ display: inline-block;
547
+ mask-size: cover;
548
+ }*/
assets/css/frontend.min.css CHANGED
@@ -1 +1 @@
1
- .download-box{width:250px;border:1px solid #ccc;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;text-align:center;position:relative;margin:1em auto;box-shadow:0 2px 4px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.4)}.download-box h1{margin:.5em 0!important}.download-box img.wp-post-image{margin:0;padding:0;display:block;width:100%;-moz-border-radius:0;-webkit-border-radius:0;-moz-border-top-left-radius:3px;-moz-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-radius:0;border-top-left-radius:3px;border-top-right-radius:3px;box-shadow:inset 0 1px 0 rgba(255,255,255,.4)}.download-box .download-box-content{padding:0 1em 1em}.download-box .download-count{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em;color:#777;text-shadow:0 1px 0 rgba(255,255,255,.5);background:#ddd;box-shadow:0 2px 4px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.4);position:absolute;top:0;right:0;padding:.6em;width:auto;min-width:1em;font-size:1em;text-align:center;vertical-align:middle;line-height:1em;border:1px solid #bbb;margin:-.5em -.5em 0 0}.download-button{text-align:center;text-decoration:none!important;padding:.75em 1em;color:#fff;display:block;font-size:1.2em;line-height:1.5em;background-color:#09c;background-image:-webkit-linear-gradient(#009fd4,#09c,#0086b2);background-image:-moz-linear-gradient(#009fd4,#09c,#0086b2);-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;text-shadow:0 -1px 0 rgba(0,0,0,.5);box-shadow:0 2px 4px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.4);border:1px solid #0086b2;cursor:pointer}.download-button:hover{color:#fff;background-color:#09c;background-image:-webkit-linear-gradient(#09c,#0086b2);background-image:-moz-linear-gradient(#09c,#0086b2)}.download-button:visited{color:#fff;text-decoration:none}.download-button small{font-size:.8em;opacity:.8;display:block}.filetype-icon{padding-left:19px;background-repeat:no-repeat;background-position:left;background-image:url(../images/filetypes/document.png)}.filetype-pdf{background-image:url(../images/filetypes/document-pdf.png)}.filetype-aif,.filetype-aifc,.filetype-aiff,.filetype-au,.filetype-kar,.filetype-m3u,.filetype-m4r,.filetype-mid,.filetype-midi,.filetype-mp2,.filetype-mp3,.filetype-mpga,.filetype-ra,.filetype-ram,.filetype-rm,.filetype-rpm,.filetype-snd,.filetype-wav,.filetype-wave{background-image:url(../images/filetypes/document-music.png)}.filetype-avi,.filetype-divx,.filetype-mov,.filetype-movie,.filetype-mp4,.filetype-mpe,.filetype-mpeg,.filetype-mpg,.filetype-mxu,.filetype-qt,.filetype-wmv{background-image:url(../images/filetypes/document-film.png)}.filetype-7z,.filetype-gz,.filetype-rar,.filetype-sit,.filetype-tar,.filetype-zip{background-image:url(../images/filetypes/document-zipper.png)}.filetype-csv,.filetype-tsv,.filetype-xls,.filetype-xlsx{background-image:url(../images/filetypes/document-excel.png)}.filetype-doc,.filetype-docx{background-image:url(../images/filetypes/document-word-text.png)}.filetype-ai{background-image:url(../images/filetypes/document-illustrator.png)}.filetype-swf{background-image:url(../images/filetypes/document-flash-movie.png)}.filetype-bmp,.filetype-djv,.filetype-eps,.filetype-gif,.filetype-ief,.filetype-jpe,.filetype-jpeg,.filetype-jpg,.filetype-pbm,.filetype-pgm,.filetype-png,.filetype-pnm,.filetype-ppm,.filetype-ps,.filetype-ras,.filetype-rgb,.filetype-tif,.filetype-tiff,.filetype-wbmp,.filetype-xbm,.filetype-xpm,.filetype-xwd{background-image:url(../images/filetypes/document-image.png)}.filetype-psd{background-image:url(../images/filetypes/document-photoshop.png)}.filetype-ppt,.filetype-pptx{background-image:url(../images/filetypes/document-powerpoint.png)}.filetype-as,.filetype-css,.filetype-htaccess,.filetype-htm,.filetype-html,.filetype-js,.filetype-php,.filetype-sql,.filetype-xml,.filetype-xsl{background-image:url(../images/filetypes/document-code.png)}.filetype-rtf,.filetype-rtx{background-image:url(../images/filetypes/document-text-image.png)}.filetype-txt{background-image:url(../images/filetypes/document-text.png)}#content nav.download-monitor-pagination,nav.download-monitor-pagination{text-align:center}#content nav.download-monitor-pagination ul,nav.download-monitor-pagination ul{display:inline-block;white-space:nowrap;padding:0;clear:both;border:1px solid #eee;border-right:0;margin:1px}#content nav.download-monitor-pagination ul li,nav.download-monitor-pagination ul li{border-right:1px solid #eee;padding:0;margin:0;float:left;display:inline;overflow:hidden}#content nav.download-monitor-pagination ul li a,#content nav.download-monitor-pagination ul li span,nav.download-monitor-pagination ul li a,nav.download-monitor-pagination ul li span{margin:0;text-decoration:none;padding:0;line-height:1em;font-size:1em;font-weight:400;padding:.5em;min-width:1em;display:block}#content nav.download-monitor-pagination ul li a:focus,#content nav.download-monitor-pagination ul li a:hover,#content nav.download-monitor-pagination ul li span.current,nav.download-monitor-pagination ul li a:focus,nav.download-monitor-pagination ul li a:hover,nav.download-monitor-pagination ul li span.current{background:#eee;color:#888}.dlm_widget_downloads ul,.dlm_widget_downloads ul li{list-style:none}.dlm-hidden-info{visibility:hidden}@keyframes infinite-spinning{from{transform:rotate(0)}to{transform:rotate(360deg)}}data.dlm-hidden-info{position:relative}data.dlm-hidden-info span{font-weight:700;color:green}.dlm-hidden-info .progress.dlm-visible-spinner{display:inline-block;visibility:visible}.dlm-hidden-info .progress.box{width:100%}.dlm-hidden-info .progress.box span.download-done::after{content:'✓'}.dlm-hidden-info .progress.box .progress-inner{height:6px;top:0;width:0%;-webkit-transition:width .3s,opacity .3s;transition:width .3s,opacity .3s;position:absolute;left:0;background:#006080;animation:none}.dlm-hidden-info .progress .progress-inner{display:none;width:75px;position:relative;margin-left:15px}.dlm-hidden-info .progress .progress-inner .dlm-visible-spinner{display:inline-block;visibility:visible}html body a.download-button{position:relative}html body a.download-button.dlm-download-started{text-decoration:none}html body a.download-button.dlm-download-complete::after{content:'✓';width:20px;right:-30px;position:absolute;height:100%;z-index:3;background:0 0;color:green;bottom:0;left:auto}html body a.download-button::before{content:'';position:absolute;height:2px;z-index:3;bottom:-2px;left:0;width:0;background:red;transition:width .5s;box-shadow:0 0 3px rgba(255,0,0,.8);border-radius:5px}html body a.download-button.download-10:before{width:10%}html body a.download-button.download-20:before{width:20%}html body a.download-button.download-30:before{width:30%}html body a.download-button.download-40:before{width:40%}html body a.download-button.download-50:before{width:50%}html body a.download-button.download-60:before{width:60%}html body a.download-button.download-70:before{width:70%}html body a.download-button.download-80:before{width:80%}html body a.download-button.download-90:before{width:90%}html body a.download-button.download-100:before{width:100%}a.download-button.dlm-download-complete::after{height:auto;top:50%;transform:translateY(-50%)}a.download-button::before{z-index:0}a.download-button>*{z-index:2;position:relative}html body a.download-link{position:relative}html body a.download-link::after,html body a.download-link::before{content:'';position:absolute;right:-40px;border-radius:5px;display:block;background:red;height:10px;width:10px;opacity:0;z-index:-1;transform:translateY(-50%);top:calc(50% - 5px)}html body a.download-link::before{animation:lds-ellipsis1 .6s infinite}html body a.download-link::after{animation:lds-ellipsis2 .6s infinite}html body a.download-link.dlm-download-started{text-decoration:none}html body a.download-link.dlm-download-started::after,html body a.download-link.dlm-download-started::before{opacity:1;z-index:99}html body a.download-link.dlm-download-complete::after{content:'✓';opacity:1;z-index:99;background:0 0;animation:none;transform:translateY(-50%);top:calc(50% - 5px);line-height:initial}html body a.download-link.dlm-download-complete::before{opacity:0;z-index:-1}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(24px,0)}}.dlm-xhr-error{font-size:12px;color:red}.dlm-xhr-progress{min-width:75px;width:auto;display:inline-block;position:relative}
1
+ .download-box{width:250px;border:1px solid #ccc;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;text-align:center;position:relative;margin:1em auto;box-shadow:0 2px 4px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.4)}.download-box h1{margin:.5em 0!important}.download-box img.wp-post-image{margin:0;padding:0;display:block;width:100%;-moz-border-radius:0;-webkit-border-radius:0;-moz-border-top-left-radius:3px;-moz-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-radius:0;border-top-left-radius:3px;border-top-right-radius:3px;box-shadow:inset 0 1px 0 rgba(255,255,255,.4)}.download-box .download-box-content{padding:0 1em 1em}.download-box .download-count{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em;color:#777;text-shadow:0 1px 0 rgba(255,255,255,.5);background:#ddd;box-shadow:0 2px 4px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.4);position:absolute;top:0;right:0;padding:.6em;width:auto;min-width:1em;font-size:1em;text-align:center;vertical-align:middle;line-height:1em;border:1px solid #bbb;margin:-.5em -.5em 0 0}.download-button{text-align:center;text-decoration:none!important;padding:.75em 1em;color:#fff;display:block;font-size:1.2em;line-height:1.5em;background-color:#09c;background-image:-webkit-linear-gradient(#009fd4,#09c,#0086b2);background-image:-moz-linear-gradient(#009fd4,#09c,#0086b2);-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;text-shadow:0 -1px 0 rgba(0,0,0,.5);box-shadow:0 2px 4px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.4);border:1px solid #0086b2;cursor:pointer}.download-button:hover{color:#fff;background-color:#09c;background-image:-webkit-linear-gradient(#09c,#0086b2);background-image:-moz-linear-gradient(#09c,#0086b2)}.download-button:visited{color:#fff;text-decoration:none}.download-button small{font-size:.8em;opacity:.8;display:block}.filetype-icon{padding-left:19px;background-repeat:no-repeat;background-position:left;background-image:url(../images/filetypes/document.png)}.filetype-pdf{background-image:url(../images/filetypes/document-pdf.png)}.filetype-aif,.filetype-aifc,.filetype-aiff,.filetype-au,.filetype-kar,.filetype-m3u,.filetype-m4r,.filetype-mid,.filetype-midi,.filetype-mp2,.filetype-mp3,.filetype-mpga,.filetype-ra,.filetype-ram,.filetype-rm,.filetype-rpm,.filetype-snd,.filetype-wav,.filetype-wave{background-image:url(../images/filetypes/document-music.png)}.filetype-avi,.filetype-divx,.filetype-mov,.filetype-movie,.filetype-mp4,.filetype-mpe,.filetype-mpeg,.filetype-mpg,.filetype-mxu,.filetype-qt,.filetype-wmv{background-image:url(../images/filetypes/document-film.png)}.filetype-7z,.filetype-gz,.filetype-rar,.filetype-sit,.filetype-tar,.filetype-zip{background-image:url(../images/filetypes/document-zipper.png)}.filetype-csv,.filetype-tsv,.filetype-xls,.filetype-xlsx{background-image:url(../images/filetypes/document-excel.png)}.filetype-doc,.filetype-docx{background-image:url(../images/filetypes/document-word-text.png)}.filetype-ai{background-image:url(../images/filetypes/document-illustrator.png)}.filetype-swf{background-image:url(../images/filetypes/document-flash-movie.png)}.filetype-bmp,.filetype-djv,.filetype-eps,.filetype-gif,.filetype-ief,.filetype-jpe,.filetype-jpeg,.filetype-jpg,.filetype-pbm,.filetype-pgm,.filetype-png,.filetype-pnm,.filetype-ppm,.filetype-ps,.filetype-ras,.filetype-rgb,.filetype-tif,.filetype-tiff,.filetype-wbmp,.filetype-xbm,.filetype-xpm,.filetype-xwd{background-image:url(../images/filetypes/document-image.png)}.filetype-psd{background-image:url(../images/filetypes/document-photoshop.png)}.filetype-ppt,.filetype-pptx{background-image:url(../images/filetypes/document-powerpoint.png)}.filetype-as,.filetype-css,.filetype-htaccess,.filetype-htm,.filetype-html,.filetype-js,.filetype-php,.filetype-sql,.filetype-xml,.filetype-xsl{background-image:url(../images/filetypes/document-code.png)}.filetype-rtf,.filetype-rtx{background-image:url(../images/filetypes/document-text-image.png)}.filetype-txt{background-image:url(../images/filetypes/document-text.png)}#content nav.download-monitor-pagination,nav.download-monitor-pagination{text-align:center}#content nav.download-monitor-pagination ul,nav.download-monitor-pagination ul{display:inline-block;white-space:nowrap;padding:0;clear:both;border:1px solid #eee;border-right:0;margin:1px}#content nav.download-monitor-pagination ul li,nav.download-monitor-pagination ul li{border-right:1px solid #eee;padding:0;margin:0;float:left;display:inline;overflow:hidden}#content nav.download-monitor-pagination ul li a,#content nav.download-monitor-pagination ul li span,nav.download-monitor-pagination ul li a,nav.download-monitor-pagination ul li span{margin:0;text-decoration:none;padding:0;line-height:1em;font-size:1em;font-weight:400;padding:.5em;min-width:1em;display:block}#content nav.download-monitor-pagination ul li a:focus,#content nav.download-monitor-pagination ul li a:hover,#content nav.download-monitor-pagination ul li span.current,nav.download-monitor-pagination ul li a:focus,nav.download-monitor-pagination ul li a:hover,nav.download-monitor-pagination ul li span.current{background:#eee;color:#888}.dlm_widget_downloads ul,.dlm_widget_downloads ul li{list-style:none}.dlm-hidden-info{visibility:hidden}@keyframes infinite-spinning{from{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes infinite-loading{from{width:0%}to{width:100%}}data.dlm-hidden-info{position:relative}data.dlm-hidden-info span{font-weight:700;color:green}.dlm-hidden-info .progress.dlm-visible-spinner{display:inline-block;visibility:visible}.dlm-hidden-info .progress.box{width:100%}.dlm-hidden-info .progress.box span.download-done::after{content:'✓'}.dlm-hidden-info .progress.box .progress-inner{height:6px;top:0;width:0%;-webkit-transition:width .3s,opacity .3s;transition:width .3s,opacity .3s;position:absolute;left:0;background:#006080;animation:none}.dlm-hidden-info .progress .progress-inner{display:none;width:75px;position:relative;margin-left:15px}.dlm-hidden-info .progress .progress-inner .dlm-visible-spinner{display:inline-block;visibility:visible}html body a.download-button{position:relative}html body a.download-button.dlm-download-started{text-decoration:none}html body a.download-button.dlm-download-complete::after{content:'✓';width:20px;right:-30px;position:absolute;height:100%;z-index:3;background:0 0;color:green;bottom:0;left:auto}html body a.download-button::before{content:'';position:absolute;height:2px;z-index:3;bottom:-2px;left:0;width:0;background:red;transition:width .5s;box-shadow:0 0 3px rgba(255,0,0,.8);border-radius:5px}html body a.download-button.download-Infinity::before{animation:infinite-loading 1s infinite linear}html body a.download-button.download-10:before{width:10%}html body a.download-button.download-20:before{width:20%}html body a.download-button.download-30:before{width:30%}html body a.download-button.download-40:before{width:40%}html body a.download-button.download-50:before{width:50%}html body a.download-button.download-60:before{width:60%}html body a.download-button.download-70:before{width:70%}html body a.download-button.download-80:before{width:80%}html body a.download-button.download-90:before{width:90%}html body a.download-button.download-100:before{width:100%}a.download-button.dlm-download-complete::after{height:auto;top:50%;transform:translateY(-50%)}a.download-button::before{z-index:0}a.download-button>*{z-index:2;position:relative}html body a.download-link{position:relative}html body a.download-link::after,html body a.download-link::before{content:'';position:absolute;right:-40px;border-radius:5px;display:block;background:red;height:10px;width:10px;opacity:0;z-index:-1;transform:translateY(-50%);top:calc(50% - 5px)}html body a.download-link::before{animation:lds-ellipsis1 .6s infinite}html body a.download-link::after{animation:lds-ellipsis2 .6s infinite}html body a.download-link.dlm-download-started{text-decoration:none}html body a.download-link.dlm-download-started::after,html body a.download-link.dlm-download-started::before{opacity:1;z-index:99}html body a.download-link.dlm-download-complete::after{content:'✓';opacity:1;z-index:99;background:0 0;animation:none;transform:translateY(-50%);top:calc(50% - 5px);line-height:initial}html body a.download-link.dlm-download-complete::before{opacity:0;z-index:-1}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(24px,0)}}.dlm-xhr-error{font-size:12px;color:red}.dlm-xhr-progress{min-width:75px;width:auto;display:inline-block;position:relative}.dlm-no-access-modal-window{position:fixed;top:50%;left:50%;color:inherit;background-color:#fff;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:auto;min-width:600px;height:auto;min-height:250px;box-shadow:rgba(0,0,0,.45) 0 25px 20px -20px;border-radius:10px;max-width:80%;max-height:90%;overflow-y:auto;z-index:99}.dlm-no-access-modal-window>*{padding:20px}.dlm-no-access-modal-window .dlm-no-access-modal__header{border-bottom:1px solid rgba(0,0,0,.1);display:flex;flex-direction:row;width:calc(100% - 40px);justify-content:space-between;align-items:center;clear:both;position:relative}.dlm-no-access-modal-window .dlm-no-access-modal__body{border-bottom:1px solid rgba(0,0,0,.1);position:relative}.dlm-no-access-modal-window .dlm-no-access-modal__footer{text-align:right}.dlm-no-access-modal-overlay{position:fixed;width:100%;height:100%;background-color:#dededea1;top:0;z-index:98}.dlm-no-access-modal-close span{display:block;position:relative;text-align:center;border-radius:100px;background:#212a2f;color:#fff}.dlm-no-access-modal-close:hover{cursor:pointer}
assets/images/features/content-grouping.png CHANGED
Binary file
assets/images/features/customisable-endpoints.png CHANGED
Binary file
assets/images/features/data-importing-exporting.png CHANGED
Binary file
assets/images/features/downloading-page.png CHANGED
Binary file
assets/images/features/enforce-download-limits.png CHANGED
Binary file
assets/images/features/gated-content.png CHANGED
Binary file
assets/images/features/instant-notifications.png CHANGED
Binary file
assets/images/features/link-downloads-from-cloud.png CHANGED
Binary file
assets/images/features/monetize-your-downloads.png CHANGED
Binary file
assets/images/features/page-addon.png CHANGED
Binary file
assets/images/features/spam-protection.png CHANGED
Binary file
assets/images/features/track-your-content.png CHANGED
Binary file
assets/js/dlm-xhr.js CHANGED
@@ -24,7 +24,7 @@ class DLM_XHR_Download {
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;
29
  } else {
30
  xhr_links += $i + ' .' + $value;
@@ -33,6 +33,13 @@ class DLM_XHR_Download {
33
  $i = ',';
34
  });
35
 
 
 
 
 
 
 
 
36
  jQuery('html, body').on('click', xhr_links, function (e) {
37
  // Search to see if we don't have to do XHR on this link
38
  if (jQuery(this).hasClass('dlm-no-xhr-download')) {
@@ -154,6 +161,17 @@ class DLM_XHR_Download {
154
  window.location.href = href;
155
  }
156
 
 
 
 
 
 
 
 
 
 
 
 
157
  // If there is a dlm-error headers means we have an error. Display the error and abort.
158
  if ('undefined' !== typeof responseHeaders['dlm-error'] && '' !== responseHeaders['dlm-error'] && null !== responseHeaders['dlm-error']) {
159
  dlmXHRinstance.dlmLogDownload(responseHeaders, 'failed', false);
@@ -161,7 +179,13 @@ class DLM_XHR_Download {
161
  button.setAttribute('href', href);
162
  buttonObj.removeClass().addClass(buttonClass).find('span.dlm-xhr-progress').remove();
163
  request.abort();
164
- buttonObj.append('<span class="dlm-xhr-error">' + responseHeaders['dlm-error'] + '</span>');
 
 
 
 
 
 
165
  return;
166
  }
167
 
@@ -263,7 +287,6 @@ class DLM_XHR_Download {
263
 
264
  if (null !== no_access) {
265
  window.location.href = redirect_path;
266
- return;
267
  }
268
 
269
  const currentURL = window.location.href;
@@ -291,6 +314,47 @@ class DLM_XHR_Download {
291
  });
292
  }
293
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  dlmExternalDownload(headers, button, buttonObj, file_name, href) {
295
  const request = new XMLHttpRequest(),
296
  uri = headers['dlm-external-download'],
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;
29
  } else {
30
  xhr_links += $i + ' .' + $value;
33
  $i = ',';
34
  });
35
 
36
+ jQuery('html, body').on('click', '.dlm-no-access-modal-overlay, .dlm-no-access-modal-close', function (e) {
37
+
38
+ jQuery( '#dlm-no-access-modal' ).remove();
39
+
40
+ });
41
+
42
+
43
  jQuery('html, body').on('click', xhr_links, function (e) {
44
  // Search to see if we don't have to do XHR on this link
45
  if (jQuery(this).hasClass('dlm-no-xhr-download')) {
161
  window.location.href = href;
162
  }
163
 
164
+ if ('undefined' !== typeof responseHeaders['dlm-no-access'] && 'true' === responseHeaders['dlm-no-access']) {
165
+ if ('undefined' !== typeof responseHeaders['dlm-no-access-modal'] && 0 != responseHeaders['dlm-no-access-modal']) {
166
+ dlmXHRinstance.dlmNoAccessModal(responseHeaders);
167
+ button.removeAttribute('download');
168
+ button.setAttribute('href', href);
169
+ buttonObj.removeClass().addClass(buttonClass).find('span.dlm-xhr-progress').remove();
170
+ request.abort();
171
+ return;
172
+ }
173
+ }
174
+
175
  // If there is a dlm-error headers means we have an error. Display the error and abort.
176
  if ('undefined' !== typeof responseHeaders['dlm-error'] && '' !== responseHeaders['dlm-error'] && null !== responseHeaders['dlm-error']) {
177
  dlmXHRinstance.dlmLogDownload(responseHeaders, 'failed', false);
179
  button.setAttribute('href', href);
180
  buttonObj.removeClass().addClass(buttonClass).find('span.dlm-xhr-progress').remove();
181
  request.abort();
182
+
183
+ if( 'undefined' !== typeof responseHeaders['dlm-no-access-modal'] && 0 != responseHeaders['dlm-no-access-modal']){
184
+ dlmXHRinstance.dlmNoAccessModal( responseHeaders['dlm-download-id'], responseHeaders['dlm-version-id'], responseHeaders['dlm-no-access-modal-text'] );
185
+ } else {
186
+ buttonObj.append('<span class="dlm-xhr-error">' + responseHeaders['dlm-error'] + '</span>');
187
+ }
188
+
189
  return;
190
  }
191
 
287
 
288
  if (null !== no_access) {
289
  window.location.href = redirect_path;
 
290
  }
291
 
292
  const currentURL = window.location.href;
314
  });
315
  }
316
 
317
+ dlmNoAccessModal( headers){
318
+ let download = 'empty-download',
319
+ version = 'empty-version',
320
+ restriction = 'empty-restriction',
321
+ text = '';
322
+
323
+ if ('undefined' !== typeof headers['dlm-download-id']) {
324
+ download = headers['dlm-download-id'];
325
+ }
326
+
327
+ if ('undefined' !== typeof headers['dlm-version-id']) {
328
+ version = headers['dlm-version-id'];
329
+ }
330
+
331
+ if ('undefined' !== typeof headers['dlm-no-access-modal-text']) {
332
+ text = headers['dlm-no-access-modal-text'];
333
+ }
334
+
335
+ if ( 'undefined' !== typeof headers['dlm-no-access-restriction'] ) {
336
+ restriction = headers['dlm-no-access-restriction'];
337
+ }
338
+
339
+ const data = {
340
+ download_id: download,
341
+ version_id : version,
342
+ modal_text : text,
343
+ restriction,
344
+ action : 'no_access_dlm_xhr_download',
345
+ nonce : dlmXHR.nonce
346
+ };
347
+
348
+ jQuery.post(dlmXHR.ajaxUrl, data, function (response) {
349
+
350
+ jQuery( '#dlm-no-access-modal' ).remove();
351
+ jQuery('body').append( response );
352
+
353
+ jQuery(document).trigger( 'dlm_no_access_modal_response', [ response, data ] );
354
+
355
+ });
356
+ }
357
+
358
  dlmExternalDownload(headers, button, buttonObj, file_name, href) {
359
  const request = new XMLHttpRequest(),
360
  uri = headers['dlm-external-download'],
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){return!!jQuery(this).hasClass("dlm-no-xhr-download")||(0<=jQuery(this).attr("href").indexOf("?add-to-cart")||void 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:r,href:n,buttonObj:l}=e,a;const s=new XMLHttpRequest,i=dlmXHR.prevent_duplicates,c=l.attr("target");let m=l.attr("class");m=void 0!==m&&""!==m?m.replace("dlm-download-started","").replace("dlm-download-completed",""):"",l.addClass("dlm-download-started"),r.setAttribute("href","#"),r.removeAttribute("download"),r.setAttribute("disabled","disabled");e=0<n.indexOf("?")?n+"&nonce="+dlmXHR.nonce:n+"?nonce="+dlmXHR.nonce;jQuery(document).trigger("dlm_download_triggered",[this,r,l,a]),s.responseType="blob",s.onreadystatechange=function(){var{status:e,readyState:t,statusText:d}=s;let o=s.getAllResponseHeaders().split("\r\n").reduce((e,t)=>{var[t,d]=t.split(": ");return e[t]=d,e},{});if(2===s.readyState){if(void 0!==o["dlm-no-waypoints"]&&(s.abort(),window.location.href=n),void 0!==o["dlm-external-download"]){s.abort();let e="";return void 0!==o["dlm-file-name"]?(e=o["dlm-file-name"].replace(/\"/g,"").replace(";",""),e=decodeURI(e)):void 0!==o["content-disposition"]&&(e=(e=o["content-disposition"].split("filename=")[1]).replace(/\"/g,"").replace(";",""),e=decodeURI(e)),void dlmXHRinstance.dlmExternalDownload(o,r,l,e,n)}if(0===Object.keys(o).filter(e=>-1!==e.indexOf("dlm-")).length&&(s.abort(),window.location.href=n),void 0!==o["dlm-error"]&&""!==o["dlm-error"]&&null!==o["dlm-error"])return dlmXHRinstance.dlmLogDownload(o,"failed",!1),r.removeAttribute("download"),r.setAttribute("href",n),l.removeClass().addClass(m).find("span.dlm-xhr-progress").remove(),s.abort(),void l.append('<span class="dlm-xhr-error">'+o["dlm-error"]+"</span>");if(void 0!==o["dlm-redirect"]&&""!==o["dlm-redirect"]&&null!==o["dlm-redirect"])return dlmXHRinstance.dlmLogDownload(o,"redirected",!1,o["dlm-redirect"],o["dlm-no-access"],c),r.removeAttribute("download"),r.setAttribute("href",n),l.removeClass().addClass(m).find("span.dlm-xhr-progress").remove(),void s.abort()}if(404==e&&2==t){let e=document.createElement("p");e.innerHTML=d,r.parentNode.appendChild(e)}if(401==e&&2==t&&(window.location.href=d),403==e&&2==t){let e=document.createElement("p");e.innerHTML=d,r.parentNode.appendChild(e)}if(200==e&&4==t){d=s.response;let e=o["content-disposition"].split("filename=")[1];e=e.replace(/\"/g,"").replace(";",""),e=decodeURI(e),a=URL.createObjectURL(d),r.removeEventListener("click",dlmXHRinstance.handleDownloadClick),r.setAttribute("download",""+e),r.setAttribute("href",a),r.click(),l.removeClass().addClass(m+" dlm-download-complete"),dlmXHRinstance.attachButtonEvent(),jQuery(document).trigger("dlm_download_complete",[this,r,l,a]),dlmXHRinstance.dlmLogDownload(o,"completed",i),window.URL.revokeObjectURL(a),r.removeAttribute("download"),r.setAttribute("href",n),setTimeout(function(){l.removeClass().addClass(m).find("span.dlm-xhr-progress").remove()},4e3)}},s.addEventListener("progress",function(e){let t=e.loaded/e.total*100;t=t.toFixed(2);var d;l.find("span.dlm-xhr-progress").remove(),d="dlm-download-started download-"+10*Math.ceil(t/10),1/0!=t&&l.append('<span class="dlm-xhr-progress">&nbsp;'+t+"%</span>"),l.removeClass().addClass(m+" "+d),jQuery(document).trigger("dlm_download_progress",[this,r,l,a,e,t])}),s.onerror=function(){r.removeAttribute("download"),r.setAttribute("href",n),l.removeClass().addClass(m+" dlm-no-xhr-download").find("span.dlm-xhr-progress").remove(),l.append('<span class="dlm-xhr-error">'+dlmXHRtranslations.error+"</span>"),console.log("** An error occurred during the transaction")},s.open("GET",e,!0),s.setRequestHeader("dlm-xhr-request","dlm_XMLHttpRequest"),s.send()}dlmLogDownload(e,t,d,o=null,r=null,n="_self"){null!==r?window.location.href=o:(r=window.location.href,t={download_id:e["dlm-download-id"],version_id:e["dlm-version-id"],status:t,cookie:d,currentURL:r,action:"log_dlm_xhr_download",responseHeaders:e,nonce:dlmXHR.nonce},jQuery.post(dlmXHR.ajaxUrl,t,function(e){null!==o&&(null==n&&(n="_self"),window.open(o,n))}))}dlmExternalDownload(e,o,r,n,l){const a=new XMLHttpRequest,t=e["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,d=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,"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,"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",t,!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 o="",t="";jQuery.each(dlmXHR.xhr_links.class,function(e,d){-1<d.indexOf("[class")||-1<d.indexOf("[id")?o+=t+" "+d:o+=t+" ."+d,t=","}),jQuery("html, body").on("click",".dlm-no-access-modal-overlay, .dlm-no-access-modal-close",function(e){jQuery("#dlm-no-access-modal").remove()}),jQuery("html, body").on("click",o,function(e){return!!jQuery(this).hasClass("dlm-no-xhr-download")||(0<=jQuery(this).attr("href").indexOf("?add-to-cart")||void dlmXHRinstance.handleDownloadClick(this,e))})}handleDownloadClick(e,d){d.stopPropagation();var o=e.getAttribute("href");let t={button:e,href:o,buttonObj:jQuery(e)};-1===t.href.indexOf("blob:http")&&"#"!==t.href&&(d.preventDefault(),dlmXHRinstance.retrieveBlob(t))}retrieveBlob(e){let{button:n,href:l,buttonObj:a}=e,s;const i=new XMLHttpRequest,c=dlmXHR.prevent_duplicates,m=a.attr("target");let p=a.attr("class");p=void 0!==p&&""!==p?p.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:d,statusText:o}=i;let t=i.getAllResponseHeaders().split("\r\n").reduce((e,d)=>{var[d,o]=d.split(": ");return e[d]=o,e},{});if(2===i.readyState){if(void 0!==t["dlm-no-waypoints"]&&(i.abort(),window.location.href=l),void 0!==t["dlm-external-download"]){i.abort();let e="";return void 0!==t["dlm-file-name"]?(e=t["dlm-file-name"].replace(/\"/g,"").replace(";",""),e=decodeURI(e)):void 0!==t["content-disposition"]&&(e=(e=t["content-disposition"].split("filename=")[1]).replace(/\"/g,"").replace(";",""),e=decodeURI(e)),void dlmXHRinstance.dlmExternalDownload(t,n,a,e,l)}var r=Object.keys(t).filter(e=>-1!==e.indexOf("dlm-")).length;if(0===r&&(i.abort(),window.location.href=l),void 0!==t["dlm-no-access"]&&"true"===t["dlm-no-access"]&&void 0!==t["dlm-no-access-modal"]&&0!=t["dlm-no-access-modal"])return dlmXHRinstance.dlmNoAccessModal(t),n.removeAttribute("download"),n.setAttribute("href",l),a.removeClass().addClass(p).find("span.dlm-xhr-progress").remove(),void i.abort();if(void 0!==t["dlm-error"]&&""!==t["dlm-error"]&&null!==t["dlm-error"])return dlmXHRinstance.dlmLogDownload(t,"failed",!1),n.removeAttribute("download"),n.setAttribute("href",l),a.removeClass().addClass(p).find("span.dlm-xhr-progress").remove(),i.abort(),void(void 0!==t["dlm-no-access-modal"]&&0!=t["dlm-no-access-modal"]?dlmXHRinstance.dlmNoAccessModal(t["dlm-download-id"],t["dlm-version-id"],t["dlm-no-access-modal-text"]):a.append('<span class="dlm-xhr-error">'+t["dlm-error"]+"</span>"));if(void 0!==t["dlm-redirect"]&&""!==t["dlm-redirect"]&&null!==t["dlm-redirect"])return dlmXHRinstance.dlmLogDownload(t,"redirected",!1,t["dlm-redirect"],t["dlm-no-access"],m),n.removeAttribute("download"),n.setAttribute("href",l),a.removeClass().addClass(p).find("span.dlm-xhr-progress").remove(),void i.abort()}if(404==e&&2==d){let e=document.createElement("p");e.innerHTML=o,n.parentNode.appendChild(e)}if(401==e&&2==d&&(window.location.href=o),403==e&&2==d){let e=document.createElement("p");e.innerHTML=o,n.parentNode.appendChild(e)}if(200==e&&4==d){r=i.response;let e=t["content-disposition"].split("filename=")[1];e=e.replace(/\"/g,"").replace(";",""),e=decodeURI(e),s=URL.createObjectURL(r),n.removeEventListener("click",dlmXHRinstance.handleDownloadClick),n.setAttribute("download",""+e),n.setAttribute("href",s),n.click(),a.removeClass().addClass(p+" dlm-download-complete"),dlmXHRinstance.attachButtonEvent(),jQuery(document).trigger("dlm_download_complete",[this,n,a,s]),dlmXHRinstance.dlmLogDownload(t,"completed",c),window.URL.revokeObjectURL(s),n.removeAttribute("download"),n.setAttribute("href",l),setTimeout(function(){a.removeClass().addClass(p).find("span.dlm-xhr-progress").remove()},4e3)}},i.addEventListener("progress",function(e){let d=e.loaded/e.total*100;d=d.toFixed(2);var o;a.find("span.dlm-xhr-progress").remove(),o="dlm-download-started download-"+10*Math.ceil(d/10),1/0!=d&&a.append('<span class="dlm-xhr-progress">&nbsp;'+d+"%</span>"),a.removeClass().addClass(p+" "+o),jQuery(document).trigger("dlm_download_progress",[this,n,a,s,e,d])}),i.onerror=function(){n.removeAttribute("download"),n.setAttribute("href",l),a.removeClass().addClass(p+" 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,d,o,t=null,r=null,n="_self"){null!==r&&(window.location.href=t);r=window.location.href,d={download_id:e["dlm-download-id"],version_id:e["dlm-version-id"],status:d,cookie:o,currentURL:r,action:"log_dlm_xhr_download",responseHeaders:e,nonce:dlmXHR.nonce};jQuery.post(dlmXHR.ajaxUrl,d,function(e){null!==t&&(null==n&&(n="_self"),window.open(t,n))})}dlmNoAccessModal(e){let d="empty-download",o="empty-version",t="empty-restriction",r="";void 0!==e["dlm-download-id"]&&(d=e["dlm-download-id"]),void 0!==e["dlm-version-id"]&&(o=e["dlm-version-id"]),void 0!==e["dlm-no-access-modal-text"]&&(r=e["dlm-no-access-modal-text"]),void 0!==e["dlm-no-access-restriction"]&&(t=e["dlm-no-access-restriction"]);const n={download_id:d,version_id:o,modal_text:r,restriction:t,action:"no_access_dlm_xhr_download",nonce:dlmXHR.nonce};jQuery.post(dlmXHR.ajaxUrl,n,function(e){jQuery("#dlm-no-access-modal").remove(),jQuery("body").append(e),jQuery(document).trigger("dlm_no_access_modal_response",[e,n])})}dlmExternalDownload(e,t,r,n,l){const a=new XMLHttpRequest,d=e["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"),t.setAttribute("href","#"),t.removeAttribute("download"),t.setAttribute("disabled","disabled"),jQuery(document).trigger("dlm_download_triggered",[this,t,r,i]),a.responseType="blob",a.onreadystatechange=function(){var{status:e,readyState:d}=a,o=a.getAllResponseHeaders().split("\r\n").reduce((e,d)=>{var[d,o]=d.split(": ");return e[d]=o,e},{});if(403===e)return dlmXHRinstance.dlmLogDownload(o,"failed",!1),a.abort(),void r.append('<span class="dlm-xhr-error">Acces Denied to file.</span>');200==e&&4==d&&(e=a.response,i=URL.createObjectURL(e),t.removeEventListener("click",dlmXHRinstance.handleDownloadClick),t.setAttribute("download",""+n),t.setAttribute("href",i),t.click(),r.removeClass().addClass(s+" dlm-download-complete"),dlmXHRinstance.attachButtonEvent(),jQuery(document).trigger("dlm_download_complete",[this,t,r,i]),dlmXHRinstance.dlmLogDownload(o,"completed",!1),window.URL.revokeObjectURL(i),t.removeAttribute("download"),t.setAttribute("href",l),setTimeout(function(){r.removeClass().addClass(s).find("span.dlm-xhr-progress").remove()},1e3))},a.addEventListener("progress",function(e){let d=e.loaded/e.total*100;d=d.toFixed(2);var o;r.find("span.dlm-xhr-progress").remove(),o="dlm-download-started download-"+10*Math.ceil(d/10),1/0!=d&&r.append('<span class="dlm-xhr-progress">&nbsp;'+d+"%</span>"),r.removeClass().addClass(s+" "+o),jQuery(document).trigger("dlm_download_progress",[this,t,r,i,e,d])}),a.onerror=function(){t.removeAttribute("download"),t.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",d,!0),a.setRequestHeader("dlm-xhr-request","dlm_XMLHttpRequest"),a.send()}}
assets/js/edit-download.js CHANGED
@@ -24,6 +24,7 @@ jQuery(function ($) {
24
  this.newFileAction();
25
  this.removeFileAction();
26
  this.clickActions();
 
27
  }
28
 
29
  /**
@@ -734,6 +735,19 @@ jQuery(function ($) {
734
  });
735
  }
736
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
737
  }
738
 
739
 
24
  this.newFileAction();
25
  this.removeFileAction();
26
  this.clickActions();
27
+ this.otherActions();
28
  }
29
 
30
  /**
735
  });
736
  }
737
  }
738
+ /**
739
+ * Other functions that are used
740
+ *
741
+ * @since 4.7.4
742
+ */
743
+ otherActions() {
744
+ // Update the version number when version input changes
745
+ jQuery(document).on('keyup', 'input[name^="downloadable_file_version"]', function () {
746
+ const value = '' !== jQuery(this).val() ? jQuery(this).val() : 'n/a';
747
+
748
+ jQuery(this).parents('.downloadable_file').find('.dlm-version-info__version').text(value);
749
+ });
750
+ }
751
  }
752
 
753
 
assets/js/edit-download.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(d){var t=[],i={};function o(){jQuery(".downloadable_files .downloadable_file").each(function(e,n){jQuery(".file_menu_order",n).val(parseInt(jQuery(n).index(".downloadable_files .downloadable_file")))})}jQuery(".dlm-metabox.closed").each(function(){jQuery(this).find(".dlm-metabox-content").hide()}),jQuery(".date-picker-field").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0}),jQuery(".downloadable_files").sortable({items:".downloadable_file",cursor:"move",axis:"y",handle:"h3",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"dlm-metabox-sortable-placeholder",start:function(e,n){n.item.css("background-color","#f6f6f6")},stop:function(e,n){n.item.removeAttr("style"),o()}}),window.send_to_browse_file_url=function(e){e&&((old=jQuery.trim(jQuery(downloadable_files_field).val()))&&(old+="\n"),jQuery(downloadable_files_field).val(old+e)),tb_remove(),window.send_to_editor=window.send_to_editor_default},new class{constructor(){(dlmEditInstance=this).init()}init(){this.createUploaders(),this.initUploaders(),this.newFileAction(),this.removeFileAction(),this.clickActions()}createUploaders(){var e=Backbone.Model.extend({initialize:function(e){this.uploaderOptions=e,dlmUploaderInstance=this;const n=new wp.Uploader(dlmUploaderInstance.uploaderOptions),o=n.dropzone;o.on("dropzone:enter",dlmUploaderInstance.show),o.on("dropzone:leave",dlmUploaderInstance.hide),n.uploader.bind("FilesAdded",dlmUploaderInstance.dlmFileAdded),n.uploader.bind("FileUploaded",dlmUploaderInstance.dlmAddFileToPath),n.uploader.bind("Error",dlmUploaderInstance.dlmUploadError),n.uploader.bind("UploadProgress",dlmUploaderInstance.uploadProgress)},dlmAddFileToPath:function(i,r){const a=r.attachment.attributes.url;if("plupload-browse-button"!==jQuery(i.settings.browse_button).attr("id")){const n=jQuery(i.settings.browse_button).parents(".dlm-file-version__row").find("textarea");dlmUploaderInstance.endUploadProgress(n.parents(".dlm-file-version__row"));let e=n.val();e=e?e+"\n"+a:a,n.val(e),dlmEditInstance.afterAddFile(n,r,i)}else dlmEditInstance.addNewFile(),jQuery(document).on("dlm_new_file_added",function(e){const n=jQuery(this),o=jQuery(".dlm-metaboxes.downloadable_files").find(".downloadable_file").first(),l=o.find("textarea"),t=dlmUploaderInstance.retrieveVersion(r),d=o.find('input[name*="downloadable_file_version"]');dlmUploaderInstance.endUploadProgress(jQuery(i.settings.container).parents("#dlm-new-upload")),l.val(a),null!==t&&d.val(t),dlmEditInstance.afterAddFile(l,r,i),n.off(e)})},dlmFileAdded:function(e,n){if("plupload-browse-button"!==jQuery(e.settings.browse_button).attr("id")){const o=jQuery(e.settings.browse_button).parents(".dlm-file-version__row").find("textarea");dlmUploaderInstance.startUploadProgress(o.parents(".dlm-file-version__row"))}else dlmUploaderInstance.startUploadProgress(jQuery(e.settings.container).parents("#dlm-new-upload"))},dlmUploadError:function(e,n){jQuery(e.settings.browse_button).parent().append('<p class="error description" style="color:red;">'+n.message+"</p>"),setTimeout(function(){jQuery(e.settings.browse_button).parent().find(".error.description").remove()},3500)},uploadProgress:function(e,n){jQuery(e.settings.container).parent().parent().find(".dlm-uploading-file label span").html(e.total.percent+"%"),jQuery(e.settings.container).parent().parent().find(".dlm-uploading-file .dlm-uploading-progress-bar").css({width:e.total.percent+"%"})},retrieveVersion:function(e){const n=e.name;if(n.indexOf("-")<0)return null;let o=n.split("-")[1],l=o.split(".");return l=l.pop(),(o=o.slice(0,-(l.length+1))).length?o:null},startUploadProgress:function(e){e.find(".dlm-uploading-file").removeClass("hidden")},endUploadProgress:function(e){e.find(".dlm-uploading-file label").toggleClass("hidden"),setTimeout(function(){e.find(".dlm-uploading-file").addClass("hidden"),e.find(".dlm-uploading-file label").toggleClass("hidden")},1500)}}),n=Backbone.View.extend({tagName:"div",className:"dlm-uploader-editor",template:wp.template("uploader-editor"),localDrag:!1,overContainer:!1,overDropzone:!1,draggingFile:null,args:{},elementContainer:null,initialize:function(e){return this.initialized=!1,this.args=e,this.elementContainer=jQuery(this.args.container[0]).attr("id"),window.tinyMCEPreInit&&window.tinyMCEPreInit.dragDropUpload&&this.browserSupport()&&(this.$document=d(document),this.dropzone=null,this.files=[],this.$document.on("drop","#"+this.elementContainer+" .dlm-uploader-editor",_.bind(this.drop,this)),this.$document.on("click","#"+this.elementContainer+" .dlm-uploader-editor",_.bind(this.click,this)),this.$document.on("dragover","#"+this.elementContainer+" .dlm-uploader-editor",_.bind(this.dropzoneDragover,this)),this.$document.on("dragleave","#"+this.elementContainer+" .dlm-uploader-editor",_.bind(this.dropzoneDragleave,this)),this.$document.on("dragover",_.bind(this.containerDragover,this)),this.$document.on("dragleave",_.bind(this.containerDragleave,this)),this.$document.on("dragstart dragend drop",_.bind(function(e){this.localDrag="dragstart"===e.type,"drop"===e.type&&this.containerDragleave()},this)),this.initialized=!0),this},browserSupport:function(){var e=document.createElement("div");return("draggable"in e||"ondragstart"in e&&"ondrop"in e)&&!!(window.File&&window.FileList&&window.FileReader)},isDraggingFile:function(e){return null!==this.draggingFile?this.draggingFile:!_.isUndefined(e.originalEvent)&&!_.isUndefined(e.originalEvent.dataTransfer)&&(this.draggingFile=-1<_.indexOf(e.originalEvent.dataTransfer.types,"Files")&&-1===_.indexOf(e.originalEvent.dataTransfer.types,"text/plain"),this.draggingFile)},refresh:function(e){return this.dropzone.toggle(this.overContainer||this.overDropzone),_.isUndefined(e)||d(e.target).closest(".dlm-uploader-editor").toggleClass("droppable",this.overDropzone),this.overContainer||this.overDropzone||(this.draggingFile=null),this},render:function(){return this.initialized&&(this.$el.html(this.template()),jQuery("#"+this.elementContainer).append(this.$el),this.dropzone=this.$el),this},containerDragover:function(e){!this.localDrag&&this.isDraggingFile(e)&&(this.overContainer=!0,this.refresh())},containerDragleave:function(){this.overContainer=!1,_.delay(_.bind(this.refresh,this),50)},dropzoneDragover:function(e){if(!this.localDrag&&this.isDraggingFile(e))return this.overDropzone=!0,this.refresh(e),!1},dropzoneDragleave:function(e){this.overDropzone=!1,_.delay(_.bind(this.refresh,this,e),50)},drop:function(e){return this.containerDragleave(e),this.dropzoneDragleave(e),!1},click:function(e){this.containerDragleave(e),this.dropzoneDragleave(e),this.localDrag=!1}});i.uploadHandlerModel=e,i.uploadHandlerView=n}initUploaders(){var e={browser:jQuery("#plupload-browse-button"),plupload:{multi_selection:!1},params:{type:"dlm_download"},container:jQuery("#drag-drop-area"),dropzone:jQuery("#drag-drop-area")};new i.uploadHandlerModel(e);const n=new i.uploadHandlerView(e);n.render(),t.push(jQuery("#plupload-browse-button")),d(".dlm_upload_file:not(#plupload-browse-button)").each((e,n)=>{t.push(d(n));const o={browser:d(n),plupload:{multi_selection:!1},params:{type:"dlm_download"},container:d(n).parents("div.dlm-uploader-container"),dropzone:d(n).parents("div.dlm-uploader-container")},l=(new i.uploadHandlerModel(o),new i.uploadHandlerView(o));l.render()})}newFileAction(){d(document).on("dlm_new_file_added",()=>{d(".dlm_upload_file:not(#plupload-browse-button)").each((e,n)=>{if(t.includes(d(n)))return!0;t.push(d(n));const o={browser:d(n),plupload:{multi_selection:!1},params:{type:"dlm_download"},container:d(n).parents("div.dlm-uploader-container"),dropzone:d(n).parents("div.dlm-uploader-container")},l=(new i.uploadHandlerModel(o),new i.uploadHandlerView(o));l.render()}),jQuery("#dlm-new-upload").hide();var e=jQuery(".downloadable_file");0!==e.length&&(jQuery(".dlm-versions-tab").show(),jQuery(".dlm-versions-tab .dlm-versions-number").html("("+e.length+")"))})}removeFileAction(){d(document).on("dlm_remove_file",()=>{0===jQuery(".downloadable_files").find(".dlm-metabox.downloadable_file").length&&jQuery("#dlm-new-upload").show()})}clickActions(){const t=this;jQuery(".dlm-metaboxes-wrapper").on("click",".dlm-metabox h3",function(e){if(!jQuery(e.target).filter(":input, option").length){const n=jQuery(this),o=n.next(".dlm-metabox-content");n.toggleClass("opened"),o.toggle(),jQuery(".dlm-metabox h3").not(n).removeClass("opened"),jQuery(".dlm-metabox-content").not(o).hide()}}),jQuery(".download_monitor_files").on("click","a.add_file",function(e){e.preventDefault(),t.addNewFile()}),jQuery(".download_monitor_files").on("click",".remove_file",function(e){var n;return e.preventDefault(),confirm(dlm_ed_strings.confirm_delete)&&(0<(e=(n=jQuery(this).closest(".downloadable_file")).attr("data-file"))?(jQuery(n).block({message:null,overlayCSS:{background:"#fff url("+d("#dlm-plugin-url").val()+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}}),e={action:"download_monitor_remove_file",file_id:e,download_id:d("#dlm-post-id").val(),security:d("#dlm-ajax-nonce-remove-file").val()},jQuery.post(ajaxurl,e,function(e){jQuery(n).fadeOut("300").remove(),jQuery(document).trigger("dlm_remove_file",[this,n])})):jQuery(n).fadeOut("300").remove()),!1}),jQuery(".download_monitor_files").on("click","a.dlm_browse_for_file",function(e){if(e.preventDefault(),!(0<jQuery(this).parents("#dlm-new-upload").length))return downloadable_files_field=jQuery(this).closest(".downloadable_file").find('textarea[name^="downloadable_file_urls"]'),window.send_to_editor=window.send_to_browse_file_url,tb_show(dlm_ed_strings.browse_file,"media-upload.php?post_id="+d("#dlm-post-id").val()+"&amp;type=downloadable_file_browser&amp;from=wpdlm01&amp;TB_iframe=true"),dlmEditInstance.afterAddFile(downloadable_files_field),!1;t.addNewFile(),jQuery(document).on("dlm_new_file_added",function(e){const n=jQuery(this);return downloadable_files_field=jQuery(".downloadable_file").find('textarea[name^="downloadable_file_urls"]'),window.send_to_editor=window.send_to_browse_file_url,tb_show(dlm_ed_strings.browse_file,"media-upload.php?post_id="+d("#dlm-post-id").val()+"&amp;type=downloadable_file_browser&amp;from=wpdlm01&amp;TB_iframe=true"),n.off(e),dlmEditInstance.afterAddFile(downloadable_files_field),!1})}),jQuery(".download_monitor_files").on("click","a.dlm_external_source",function(e){if(e.preventDefault(),!(0<jQuery(this).parents("#dlm-new-upload").length))return downloadable_files_field=jQuery(this).closest(".downloadable_file").find('textarea[name^="downloadable_file_urls"]'),dlmEditInstance.afterAddFile(downloadable_files_field),!1;t.addNewFile(),jQuery(document).on("dlm_new_file_added",function(e){const n=jQuery(this);return downloadable_files_field=jQuery(".downloadable_file").find('textarea[name^="downloadable_file_urls"]'),n.off(e),dlmEditInstance.afterAddFile(downloadable_files_field),!1})}),jQuery(document).on("click",".dlm_media_library",function(e){e.preventDefault();var o=d(this),l=null;0<jQuery(this).parents("#dlm-new-upload").length?(t.addNewFile(),jQuery(document).on("dlm_new_file_added",function(e){const n=jQuery(this);l=jQuery("textarea.downloadable_file_urls");t.addBrowsedFile(o,l,"",void 0),n.off(e),dlmEditInstance.afterAddFile(l)})):(e=(l=o.parents(".dlm-file-version__row").find(".downloadable_file_urls")).val(),t.addBrowsedFile(o,l,e,void 0),dlmEditInstance.afterAddFile(l))}),d(".copy-dlm-button").on("click",function(e){e.preventDefault();e=d(this).parent().find("input");e.focus(),e.select(),document.execCommand("copy"),d(this).next("span").text(d(this).data("item")+" copied"),d(".copy-dlm-button").not(d(this)).parent().find("span").text("")}),jQuery(document).on("dlm_remove_file",function(e,n,o){var l=jQuery(".downloadable_file");0===l.length?jQuery(".dlm-versions-tab").hide():jQuery(".dlm-versions-tab .dlm-versions-number").html("("+l.length+")")})}addNewFile(){jQuery(".download_monitor_files").block({message:null,overlayCSS:{background:"#fff url("+d("#dlm-plugin-url").val()+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var e=jQuery(".downloadable_files .downloadable_file").length,e={action:"download_monitor_add_file",post_id:d("#dlm-post-id").val(),size:e,security:d("#dlm-ajax-nonce-add-file").val()};return jQuery.post(ajaxurl,e,function(e){jQuery(".downloadable_files").prepend(e),o(),jQuery(".download_monitor_files").unblock(),jQuery(".date-picker-field").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0}),jQuery(document).trigger("dlm_new_file_added",[this,e])}),!1}addBrowsedFile(e,n,o,l){l&&l.close();var t=[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:e.data("choose"),priority:20,filterable:"all"})];(l=wp.media.frames.downloadable_file=wp.media({title:e.data("choose"),library:{type:""},button:{text:e.data("update")},multiple:!0,states:t})).on("select",function(){l.state().get("selection").map(function(e){(e=e.toJSON()).url&&(o=o?o+"\n"+e.url:e.url)}),n.val(o)}),l.on("ready",function(){l.uploader.options.uploader.params={type:"dlm_download"}}),l.open()}afterAddFile(e,n=null,o=null){var l;e.parents(".dlm-file-version__row").find(".dlm-file-version__drag_and_drop").addClass("hidden"),e.parents(".dlm-file-version__row").find(".dlm-file-version__file_present").removeClass("hidden"),null!==n&&null!==o&&(o=n.attachment.id,n=d("#dlm-ajax-nonce-add-file").val(),l=parseInt(jQuery("input#post_ID").val()),e=e.parents(".downloadable_files").find(".downloadable_file").first().data("file"),jQuery.post(ajaxurl,{action:"dlm_update_file_meta",file_id:o,version_id:e,download_id:l,nonce:n},function(e){e.success||console.log("Error saving attachment meta")}))}}});
1
+ jQuery(function(d){var t=[],i={};function o(){jQuery(".downloadable_files .downloadable_file").each(function(e,n){jQuery(".file_menu_order",n).val(parseInt(jQuery(n).index(".downloadable_files .downloadable_file")))})}jQuery(".dlm-metabox.closed").each(function(){jQuery(this).find(".dlm-metabox-content").hide()}),jQuery(".date-picker-field").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0}),jQuery(".downloadable_files").sortable({items:".downloadable_file",cursor:"move",axis:"y",handle:"h3",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"dlm-metabox-sortable-placeholder",start:function(e,n){n.item.css("background-color","#f6f6f6")},stop:function(e,n){n.item.removeAttr("style"),o()}}),window.send_to_browse_file_url=function(e){e&&((old=jQuery.trim(jQuery(downloadable_files_field).val()))&&(old+="\n"),jQuery(downloadable_files_field).val(old+e)),tb_remove(),window.send_to_editor=window.send_to_editor_default},new class{constructor(){(dlmEditInstance=this).init()}init(){this.createUploaders(),this.initUploaders(),this.newFileAction(),this.removeFileAction(),this.clickActions(),this.otherActions()}createUploaders(){var e=Backbone.Model.extend({initialize:function(e){this.uploaderOptions=e,dlmUploaderInstance=this;const n=new wp.Uploader(dlmUploaderInstance.uploaderOptions),o=n.dropzone;o.on("dropzone:enter",dlmUploaderInstance.show),o.on("dropzone:leave",dlmUploaderInstance.hide),n.uploader.bind("FilesAdded",dlmUploaderInstance.dlmFileAdded),n.uploader.bind("FileUploaded",dlmUploaderInstance.dlmAddFileToPath),n.uploader.bind("Error",dlmUploaderInstance.dlmUploadError),n.uploader.bind("UploadProgress",dlmUploaderInstance.uploadProgress)},dlmAddFileToPath:function(i,r){const a=r.attachment.attributes.url;if("plupload-browse-button"!==jQuery(i.settings.browse_button).attr("id")){const n=jQuery(i.settings.browse_button).parents(".dlm-file-version__row").find("textarea");dlmUploaderInstance.endUploadProgress(n.parents(".dlm-file-version__row"));let e=n.val();e=e?e+"\n"+a:a,n.val(e),dlmEditInstance.afterAddFile(n,r,i)}else dlmEditInstance.addNewFile(),jQuery(document).on("dlm_new_file_added",function(e){const n=jQuery(this),o=jQuery(".dlm-metaboxes.downloadable_files").find(".downloadable_file").first(),l=o.find("textarea"),t=dlmUploaderInstance.retrieveVersion(r),d=o.find('input[name*="downloadable_file_version"]');dlmUploaderInstance.endUploadProgress(jQuery(i.settings.container).parents("#dlm-new-upload")),l.val(a),null!==t&&d.val(t),dlmEditInstance.afterAddFile(l,r,i),n.off(e)})},dlmFileAdded:function(e,n){if("plupload-browse-button"!==jQuery(e.settings.browse_button).attr("id")){const o=jQuery(e.settings.browse_button).parents(".dlm-file-version__row").find("textarea");dlmUploaderInstance.startUploadProgress(o.parents(".dlm-file-version__row"))}else dlmUploaderInstance.startUploadProgress(jQuery(e.settings.container).parents("#dlm-new-upload"))},dlmUploadError:function(e,n){jQuery(e.settings.browse_button).parent().append('<p class="error description" style="color:red;">'+n.message+"</p>"),setTimeout(function(){jQuery(e.settings.browse_button).parent().find(".error.description").remove()},3500)},uploadProgress:function(e,n){jQuery(e.settings.container).parent().parent().find(".dlm-uploading-file label span").html(e.total.percent+"%"),jQuery(e.settings.container).parent().parent().find(".dlm-uploading-file .dlm-uploading-progress-bar").css({width:e.total.percent+"%"})},retrieveVersion:function(e){const n=e.name;if(n.indexOf("-")<0)return null;let o=n.split("-")[1],l=o.split(".");return l=l.pop(),(o=o.slice(0,-(l.length+1))).length?o:null},startUploadProgress:function(e){e.find(".dlm-uploading-file").removeClass("hidden")},endUploadProgress:function(e){e.find(".dlm-uploading-file label").toggleClass("hidden"),setTimeout(function(){e.find(".dlm-uploading-file").addClass("hidden"),e.find(".dlm-uploading-file label").toggleClass("hidden")},1500)}}),n=Backbone.View.extend({tagName:"div",className:"dlm-uploader-editor",template:wp.template("uploader-editor"),localDrag:!1,overContainer:!1,overDropzone:!1,draggingFile:null,args:{},elementContainer:null,initialize:function(e){return this.initialized=!1,this.args=e,this.elementContainer=jQuery(this.args.container[0]).attr("id"),window.tinyMCEPreInit&&window.tinyMCEPreInit.dragDropUpload&&this.browserSupport()&&(this.$document=d(document),this.dropzone=null,this.files=[],this.$document.on("drop","#"+this.elementContainer+" .dlm-uploader-editor",_.bind(this.drop,this)),this.$document.on("click","#"+this.elementContainer+" .dlm-uploader-editor",_.bind(this.click,this)),this.$document.on("dragover","#"+this.elementContainer+" .dlm-uploader-editor",_.bind(this.dropzoneDragover,this)),this.$document.on("dragleave","#"+this.elementContainer+" .dlm-uploader-editor",_.bind(this.dropzoneDragleave,this)),this.$document.on("dragover",_.bind(this.containerDragover,this)),this.$document.on("dragleave",_.bind(this.containerDragleave,this)),this.$document.on("dragstart dragend drop",_.bind(function(e){this.localDrag="dragstart"===e.type,"drop"===e.type&&this.containerDragleave()},this)),this.initialized=!0),this},browserSupport:function(){var e=document.createElement("div");return("draggable"in e||"ondragstart"in e&&"ondrop"in e)&&!!(window.File&&window.FileList&&window.FileReader)},isDraggingFile:function(e){return null!==this.draggingFile?this.draggingFile:!_.isUndefined(e.originalEvent)&&!_.isUndefined(e.originalEvent.dataTransfer)&&(this.draggingFile=-1<_.indexOf(e.originalEvent.dataTransfer.types,"Files")&&-1===_.indexOf(e.originalEvent.dataTransfer.types,"text/plain"),this.draggingFile)},refresh:function(e){return this.dropzone.toggle(this.overContainer||this.overDropzone),_.isUndefined(e)||d(e.target).closest(".dlm-uploader-editor").toggleClass("droppable",this.overDropzone),this.overContainer||this.overDropzone||(this.draggingFile=null),this},render:function(){return this.initialized&&(this.$el.html(this.template()),jQuery("#"+this.elementContainer).append(this.$el),this.dropzone=this.$el),this},containerDragover:function(e){!this.localDrag&&this.isDraggingFile(e)&&(this.overContainer=!0,this.refresh())},containerDragleave:function(){this.overContainer=!1,_.delay(_.bind(this.refresh,this),50)},dropzoneDragover:function(e){if(!this.localDrag&&this.isDraggingFile(e))return this.overDropzone=!0,this.refresh(e),!1},dropzoneDragleave:function(e){this.overDropzone=!1,_.delay(_.bind(this.refresh,this,e),50)},drop:function(e){return this.containerDragleave(e),this.dropzoneDragleave(e),!1},click:function(e){this.containerDragleave(e),this.dropzoneDragleave(e),this.localDrag=!1}});i.uploadHandlerModel=e,i.uploadHandlerView=n}initUploaders(){var e={browser:jQuery("#plupload-browse-button"),plupload:{multi_selection:!1},params:{type:"dlm_download"},container:jQuery("#drag-drop-area"),dropzone:jQuery("#drag-drop-area")};new i.uploadHandlerModel(e);const n=new i.uploadHandlerView(e);n.render(),t.push(jQuery("#plupload-browse-button")),d(".dlm_upload_file:not(#plupload-browse-button)").each((e,n)=>{t.push(d(n));const o={browser:d(n),plupload:{multi_selection:!1},params:{type:"dlm_download"},container:d(n).parents("div.dlm-uploader-container"),dropzone:d(n).parents("div.dlm-uploader-container")},l=(new i.uploadHandlerModel(o),new i.uploadHandlerView(o));l.render()})}newFileAction(){d(document).on("dlm_new_file_added",()=>{d(".dlm_upload_file:not(#plupload-browse-button)").each((e,n)=>{if(t.includes(d(n)))return!0;t.push(d(n));const o={browser:d(n),plupload:{multi_selection:!1},params:{type:"dlm_download"},container:d(n).parents("div.dlm-uploader-container"),dropzone:d(n).parents("div.dlm-uploader-container")},l=(new i.uploadHandlerModel(o),new i.uploadHandlerView(o));l.render()}),jQuery("#dlm-new-upload").hide();var e=jQuery(".downloadable_file");0!==e.length&&(jQuery(".dlm-versions-tab").show(),jQuery(".dlm-versions-tab .dlm-versions-number").html("("+e.length+")"))})}removeFileAction(){d(document).on("dlm_remove_file",()=>{0===jQuery(".downloadable_files").find(".dlm-metabox.downloadable_file").length&&jQuery("#dlm-new-upload").show()})}clickActions(){const t=this;jQuery(".dlm-metaboxes-wrapper").on("click",".dlm-metabox h3",function(e){if(!jQuery(e.target).filter(":input, option").length){const n=jQuery(this),o=n.next(".dlm-metabox-content");n.toggleClass("opened"),o.toggle(),jQuery(".dlm-metabox h3").not(n).removeClass("opened"),jQuery(".dlm-metabox-content").not(o).hide()}}),jQuery(".download_monitor_files").on("click","a.add_file",function(e){e.preventDefault(),t.addNewFile()}),jQuery(".download_monitor_files").on("click",".remove_file",function(e){var n;return e.preventDefault(),confirm(dlm_ed_strings.confirm_delete)&&(0<(e=(n=jQuery(this).closest(".downloadable_file")).attr("data-file"))?(jQuery(n).block({message:null,overlayCSS:{background:"#fff url("+d("#dlm-plugin-url").val()+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}}),e={action:"download_monitor_remove_file",file_id:e,download_id:d("#dlm-post-id").val(),security:d("#dlm-ajax-nonce-remove-file").val()},jQuery.post(ajaxurl,e,function(e){jQuery(n).fadeOut("300").remove(),jQuery(document).trigger("dlm_remove_file",[this,n])})):jQuery(n).fadeOut("300").remove()),!1}),jQuery(".download_monitor_files").on("click","a.dlm_browse_for_file",function(e){if(e.preventDefault(),!(0<jQuery(this).parents("#dlm-new-upload").length))return downloadable_files_field=jQuery(this).closest(".downloadable_file").find('textarea[name^="downloadable_file_urls"]'),window.send_to_editor=window.send_to_browse_file_url,tb_show(dlm_ed_strings.browse_file,"media-upload.php?post_id="+d("#dlm-post-id").val()+"&amp;type=downloadable_file_browser&amp;from=wpdlm01&amp;TB_iframe=true"),dlmEditInstance.afterAddFile(downloadable_files_field),!1;t.addNewFile(),jQuery(document).on("dlm_new_file_added",function(e){const n=jQuery(this);return downloadable_files_field=jQuery(".downloadable_file").find('textarea[name^="downloadable_file_urls"]'),window.send_to_editor=window.send_to_browse_file_url,tb_show(dlm_ed_strings.browse_file,"media-upload.php?post_id="+d("#dlm-post-id").val()+"&amp;type=downloadable_file_browser&amp;from=wpdlm01&amp;TB_iframe=true"),n.off(e),dlmEditInstance.afterAddFile(downloadable_files_field),!1})}),jQuery(".download_monitor_files").on("click","a.dlm_external_source",function(e){if(e.preventDefault(),!(0<jQuery(this).parents("#dlm-new-upload").length))return downloadable_files_field=jQuery(this).closest(".downloadable_file").find('textarea[name^="downloadable_file_urls"]'),dlmEditInstance.afterAddFile(downloadable_files_field),!1;t.addNewFile(),jQuery(document).on("dlm_new_file_added",function(e){const n=jQuery(this);return downloadable_files_field=jQuery(".downloadable_file").find('textarea[name^="downloadable_file_urls"]'),n.off(e),dlmEditInstance.afterAddFile(downloadable_files_field),!1})}),jQuery(document).on("click",".dlm_media_library",function(e){e.preventDefault();var o=d(this),l=null;0<jQuery(this).parents("#dlm-new-upload").length?(t.addNewFile(),jQuery(document).on("dlm_new_file_added",function(e){const n=jQuery(this);l=jQuery("textarea.downloadable_file_urls");t.addBrowsedFile(o,l,"",void 0),n.off(e),dlmEditInstance.afterAddFile(l)})):(e=(l=o.parents(".dlm-file-version__row").find(".downloadable_file_urls")).val(),t.addBrowsedFile(o,l,e,void 0),dlmEditInstance.afterAddFile(l))}),d(".copy-dlm-button").on("click",function(e){e.preventDefault();e=d(this).parent().find("input");e.focus(),e.select(),document.execCommand("copy"),d(this).next("span").text(d(this).data("item")+" copied"),d(".copy-dlm-button").not(d(this)).parent().find("span").text("")}),jQuery(document).on("dlm_remove_file",function(e,n,o){var l=jQuery(".downloadable_file");0===l.length?jQuery(".dlm-versions-tab").hide():jQuery(".dlm-versions-tab .dlm-versions-number").html("("+l.length+")")})}addNewFile(){jQuery(".download_monitor_files").block({message:null,overlayCSS:{background:"#fff url("+d("#dlm-plugin-url").val()+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var e=jQuery(".downloadable_files .downloadable_file").length,e={action:"download_monitor_add_file",post_id:d("#dlm-post-id").val(),size:e,security:d("#dlm-ajax-nonce-add-file").val()};return jQuery.post(ajaxurl,e,function(e){jQuery(".downloadable_files").prepend(e),o(),jQuery(".download_monitor_files").unblock(),jQuery(".date-picker-field").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0}),jQuery(document).trigger("dlm_new_file_added",[this,e])}),!1}addBrowsedFile(e,n,o,l){l&&l.close();var t=[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:e.data("choose"),priority:20,filterable:"all"})];(l=wp.media.frames.downloadable_file=wp.media({title:e.data("choose"),library:{type:""},button:{text:e.data("update")},multiple:!0,states:t})).on("select",function(){l.state().get("selection").map(function(e){(e=e.toJSON()).url&&(o=o?o+"\n"+e.url:e.url)}),n.val(o)}),l.on("ready",function(){l.uploader.options.uploader.params={type:"dlm_download"}}),l.open()}afterAddFile(e,n=null,o=null){var l;e.parents(".dlm-file-version__row").find(".dlm-file-version__drag_and_drop").addClass("hidden"),e.parents(".dlm-file-version__row").find(".dlm-file-version__file_present").removeClass("hidden"),null!==n&&null!==o&&(o=n.attachment.id,n=d("#dlm-ajax-nonce-add-file").val(),l=parseInt(jQuery("input#post_ID").val()),e=e.parents(".downloadable_files").find(".downloadable_file").first().data("file"),jQuery.post(ajaxurl,{action:"dlm_update_file_meta",file_id:o,version_id:e,download_id:l,nonce:n},function(e){e.success||console.log("Error saving attachment meta")}))}otherActions(){jQuery(document).on("keyup",'input[name^="downloadable_file_version"]',function(){var e=""!==jQuery(this).val()?jQuery(this).val():"n/a";jQuery(this).parents(".downloadable_file").find(".dlm-version-info__version").text(e)})}}});
assets/js/onboarding.js CHANGED
@@ -54,6 +54,10 @@ DLM_Onboarding_CP.prototype.process = function () {
54
  if ( response.result === 'success' ) {
55
  jQuery( instance.el ).html( dlm_onboarding.lbl_created );
56
  jQuery( instance.el ).removeClass( 'dlm-create-page' ).addClass( 'dlm-page-exists' );
 
 
 
 
57
  } else {
58
  jQuery( instance.el ).html( dlm_onboarding.lbl_create_page );
59
 
54
  if ( response.result === 'success' ) {
55
  jQuery( instance.el ).html( dlm_onboarding.lbl_created );
56
  jQuery( instance.el ).removeClass( 'dlm-create-page' ).addClass( 'dlm-page-exists' );
57
+ jQuery(instance.el).parents('.block-row ').find('span.dashicons').removeClass('dashicons-no').addClass('dashicons-yes').css({
58
+ color : '#23A870',
59
+ opacity: 1
60
+ });
61
  } else {
62
  jQuery( instance.el ).html( dlm_onboarding.lbl_create_page );
63
 
assets/js/onboarding.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){e.each(e(".dlm-create-page"),function(e,t){new DLM_Onboarding_CP(t)})});var DLM_Onboarding_CP=function(e){this.el=e,this.page=jQuery(e).data("page"),this.allowAction=!0,this.setup()};DLM_Onboarding_CP.prototype.setup=function(){var e=this;jQuery(this.el).click(function(){e.process()})},DLM_Onboarding_CP.prototype.process=function(){if(!this.allowAction)return!1;this.allowAction=!1;var t=this;jQuery(t.el).html(dlm_onboarding.lbl_creating),jQuery.get(dlm_onboarding.ajax_url_create_page,{page:this.page},function(e){"success"===e.result?(jQuery(t.el).html(dlm_onboarding.lbl_created),jQuery(t.el).removeClass("dlm-create-page").addClass("dlm-page-exists")):(jQuery(t.el).html(dlm_onboarding.lbl_create_page),void 0!==e.error&&alert(e.error),t.allowAction=!0),console.log(e)})};
1
+ jQuery(function(e){e.each(e(".dlm-create-page"),function(e,o){new DLM_Onboarding_CP(o)})});var DLM_Onboarding_CP=function(e){this.el=e,this.page=jQuery(e).data("page"),this.allowAction=!0,this.setup()};DLM_Onboarding_CP.prototype.setup=function(){var e=this;jQuery(this.el).click(function(){e.process()})},DLM_Onboarding_CP.prototype.process=function(){if(!this.allowAction)return!1;this.allowAction=!1;var o=this;jQuery(o.el).html(dlm_onboarding.lbl_creating),jQuery.get(dlm_onboarding.ajax_url_create_page,{page:this.page},function(e){"success"===e.result?(jQuery(o.el).html(dlm_onboarding.lbl_created),jQuery(o.el).removeClass("dlm-create-page").addClass("dlm-page-exists"),jQuery(o.el).parents(".block-row ").find("span.dashicons").removeClass("dashicons-no").addClass("dashicons-yes").css({color:"#23A870",opacity:1})):(jQuery(o.el).html(dlm_onboarding.lbl_create_page),void 0!==e.error&&alert(e.error),o.allowAction=!0),console.log(e)})};
assets/js/reports/reports.js CHANGED
@@ -5,8 +5,8 @@ jQuery(function ($) {
5
 
6
  // Let's initiate the reports.
7
  const reports = new DLM_Reports();
8
- // Fetch our users and the logs. Do this first so that we query for users we have data.
9
- dlmReportsInstance.fetchUserData();
10
  });
11
 
12
  /**
@@ -23,6 +23,7 @@ class DLM_Reports {
23
  templates = {};
24
  totalDownloads = 0;
25
  perPage = dlmReportsPerPage;
 
26
 
27
  /**
28
  * The constructor for our class
@@ -288,11 +289,13 @@ class DLM_Reports {
288
  const dates = {};
289
  let currentDate = startDate;
290
 
291
- while (currentDate <= endDate) {
292
-
293
  dates[this.createDateElement(currentDate)] = 0;
294
  currentDate = this.getNextDay(currentDate);
295
  }
 
 
 
296
 
297
  return dates;
298
  }
@@ -919,9 +922,9 @@ class DLM_Reports {
919
 
920
  dlmReportsInstance.totalDownloads += item.downloads;
921
  mostDownloaded[key] = ('undefined' === typeof mostDownloaded[key]) ? {
922
- downloads: item.downloads, title: item.title, id: key
923
  } : {
924
- downloads: mostDownloaded[key]['downloads'] + item.downloads, title: item.title, id: key
925
  };
926
  });
927
  });
@@ -930,7 +933,8 @@ class DLM_Reports {
930
 
931
  dlmReportsInstance.setTotalDownloads(dlmReportsInstance.totalDownloads);
932
  dlmReportsInstance.setDailyAverage((dlmReportsInstance.totalDownloads / parseInt(dlmReportsInstance.stats.daysLength)).toFixed(0));
933
- dlmReportsInstance.setMostDownloaded(dlmReportsInstance.mostDownloaded[0].title);
 
934
  }
935
 
936
  /**
@@ -1219,7 +1223,9 @@ class DLM_Reports {
1219
 
1220
  for (let i = 0; i < dataResponse.length; i++) {
1221
 
1222
- const $download = dlmReportsInstance.getDownloadByID(dataResponse[i].id);
 
 
1223
  // No point on showing the download if it doesn't exist
1224
  if ('undefined' === typeof $download) {
1225
  return
@@ -1227,7 +1233,7 @@ class DLM_Reports {
1227
 
1228
  let itemObject = {
1229
  id : dataResponse[i].id,
1230
- title : dataResponse[i].title,
1231
  edit_link : dlmAdminUrl + 'post.php?post=' + dataResponse[i].id + '&action=edit',
1232
  total_downloads: $download.total.toLocaleString()
1233
  };
@@ -1742,12 +1748,12 @@ class DLM_Reports {
1742
  user : ('undefined' !== typeof user && null !== user) ? user['display_name'] : '--',
1743
  ip : dataResponse[i].user_ip,
1744
  role : (null !== user && null !== user.role ? user.role : '--'),
1745
- download : ('undefined' !== typeof download && null !== download) ? download.title : '--',
1746
  valid_user : ('0' !== dataResponse[i].user_id),
1747
  edit_link : ( '0' !== dataResponse[i].user_id) ? 'user-edit.php?user_id=' + dataResponse[i].user_id : '#',
1748
  edit_download_link: ('undefined' !== typeof download && null !== download) ? dlmAdminUrl + 'post.php?post=' + download.id + '&action=edit' : '#',
1749
  status : dataResponse[i].download_status,
1750
- download_date : dataResponse[i].download_date,
1751
  }
1752
 
1753
  jQuery(document).trigger('dlm_reports_user_logs_item_before_render', [itemObject, dlmReportsInstance, dataResponse[i], user, download]);
@@ -2020,9 +2026,10 @@ class DLM_Reports {
2020
  */
2021
  getDownloadCPT($id) {
2022
  let download = null;
2023
- if (Array.isArray(dlmReportsInstance.mostDownloaded)) {
2024
- download = dlmReportsInstance.mostDownloaded.filter((item) => {
2025
- return item.id === $id;
 
2026
  }, 0)[0];
2027
  }
2028
 
@@ -2159,4 +2166,33 @@ class DLM_Reports {
2159
 
2160
  dlmReportsInstance.handleSliderNavigation(handleObj);
2161
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2162
  }
5
 
6
  // Let's initiate the reports.
7
  const reports = new DLM_Reports();
8
+ // Let's get the available Downloads
9
+ dlmReportsInstance.fetchDownloadsCPT();
10
  });
11
 
12
  /**
23
  templates = {};
24
  totalDownloads = 0;
25
  perPage = dlmReportsPerPage;
26
+ downloads = [];
27
 
28
  /**
29
  * The constructor for our class
289
  const dates = {};
290
  let currentDate = startDate;
291
 
292
+ while (currentDate.getTime() < endDate.getTime()) {
 
293
  dates[this.createDateElement(currentDate)] = 0;
294
  currentDate = this.getNextDay(currentDate);
295
  }
296
+ // Add another day to get the last day
297
+ dates[this.createDateElement(currentDate)] = 0;
298
+ currentDate = this.getNextDay(currentDate);
299
 
300
  return dates;
301
  }
922
 
923
  dlmReportsInstance.totalDownloads += item.downloads;
924
  mostDownloaded[key] = ('undefined' === typeof mostDownloaded[key]) ? {
925
+ downloads: item.downloads, id: key
926
  } : {
927
+ downloads: mostDownloaded[key]['downloads'] + item.downloads, id: key
928
  };
929
  });
930
  });
933
 
934
  dlmReportsInstance.setTotalDownloads(dlmReportsInstance.totalDownloads);
935
  dlmReportsInstance.setDailyAverage((dlmReportsInstance.totalDownloads / parseInt(dlmReportsInstance.stats.daysLength)).toFixed(0));
936
+ const mostDownloadedItem = dlmReportsInstance.getDownloadCPT(dlmReportsInstance.mostDownloaded[0].id);
937
+ dlmReportsInstance.setMostDownloaded(mostDownloadedItem.title.rendered);
938
  }
939
 
940
  /**
1223
 
1224
  for (let i = 0; i < dataResponse.length; i++) {
1225
 
1226
+ const $download = dlmReportsInstance.getDownloadByID(dataResponse[i].id);
1227
+ const $downloadCPT = dlmReportsInstance.getDownloadCPT(dataResponse[i].id);
1228
+
1229
  // No point on showing the download if it doesn't exist
1230
  if ('undefined' === typeof $download) {
1231
  return
1233
 
1234
  let itemObject = {
1235
  id : dataResponse[i].id,
1236
+ title : dlmReportsInstance.htmlEntities( $downloadCPT.title.rendered ),
1237
  edit_link : dlmAdminUrl + 'post.php?post=' + dataResponse[i].id + '&action=edit',
1238
  total_downloads: $download.total.toLocaleString()
1239
  };
1748
  user : ('undefined' !== typeof user && null !== user) ? user['display_name'] : '--',
1749
  ip : dataResponse[i].user_ip,
1750
  role : (null !== user && null !== user.role ? user.role : '--'),
1751
+ download : ('undefined' !== typeof download && null !== download) ? dlmReportsInstance.htmlEntities(download.title.rendered) : '--',
1752
  valid_user : ('0' !== dataResponse[i].user_id),
1753
  edit_link : ( '0' !== dataResponse[i].user_id) ? 'user-edit.php?user_id=' + dataResponse[i].user_id : '#',
1754
  edit_download_link: ('undefined' !== typeof download && null !== download) ? dlmAdminUrl + 'post.php?post=' + download.id + '&action=edit' : '#',
1755
  status : dataResponse[i].download_status,
1756
+ download_date : dataResponse[i].display_date,
1757
  }
1758
 
1759
  jQuery(document).trigger('dlm_reports_user_logs_item_before_render', [itemObject, dlmReportsInstance, dataResponse[i], user, download]);
2026
  */
2027
  getDownloadCPT($id) {
2028
  let download = null;
2029
+
2030
+ if (Array.isArray(dlmReportsInstance.downloads)) {
2031
+ download = dlmReportsInstance.downloads.filter((item) => {
2032
+ return parseInt( item.id ) === parseInt( $id );
2033
  }, 0)[0];
2034
  }
2035
 
2166
 
2167
  dlmReportsInstance.handleSliderNavigation(handleObj);
2168
  }
2169
+ /**
2170
+ * HTML entities for Download's title
2171
+ *
2172
+ * @param string
2173
+ * @returns {string}
2174
+ */
2175
+ htmlEntities(string) {
2176
+ var textarea = document.getElementById("dlm_reports_decode_area");
2177
+ textarea.innerHTML = string;
2178
+ return textarea.value;
2179
+
2180
+ }
2181
+ /**
2182
+ * Get existing Downloads
2183
+ *
2184
+ * @returns {Promise<void>}
2185
+ */
2186
+ async fetchDownloadsCPT() {
2187
+ const fetchedUserData = await fetch(dlmDownloadsCptApiapi);
2188
+
2189
+ if (!fetchedUserData.ok) {
2190
+ throw new Error('Something went wrong! Reports response did not come OK - ' + fetchedUserData.statusText);
2191
+ }
2192
+
2193
+ dlmReportsInstance.downloads = await fetchedUserData.json();
2194
+
2195
+ // Fetch our users and the logs. Do this first so that we query for users we have data.
2196
+ dlmReportsInstance.fetchUserData();
2197
+ }
2198
  }
assets/js/reports/reports.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){new DLM_Reports;dlmReportsInstance.fetchUserData()});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(e=0,t=1e3){const a=jQuery('div[data-id="general_info"]');dlmReportsInstance.setSpinner(jQuery(".total_downloads_chart-wrapper")),dlmReportsInstance.setSpinner(jQuery("#users_download_log")),dlmReportsInstance.setSpinner(jQuery("#total_downloads_table_wrapper2"));let n=dlmDownloadReportsAPI+"?offset="+e+"&limit="+t;0<dlmDownloadReportsAPI.indexOf("index.php?")&&(n=dlmDownloadReportsAPI+"&offset="+e+"&limit="+t);const o=await fetch(n);if(!o.ok){const s=document.createElement("div"),r=(s.className="dlm-loading-data",document.createTextNode("Seems like we bumped into an error! ")),d=document.createTextNode("Data fetching returned a status text of : "+fetchedData.statusText),l=document.createElement("h1"),m=document.createElement("h3");throw l.appendChild(r),m.appendChild(d),s.appendChild(l),s.appendChild(m),a.find(".dlm-loading-data").remove(),a.append(s),new Error("Something went wrong! Reports response did not come OK - "+fetchedData.statusText)}dlmReportsInstance.mostDownloaded=!1,dlmReportsInstance.stats=!1,dlmReportsInstance.chartType="day";e=await o.json();dlmReportsInstance.dlmReportsStats=dlmReportsInstance.dlmReportsStats.concat(e.stats),!0===e.done?(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]),dlmReportsInstance.stopSpinner(jQuery(".total_downloads_chart-wrapper")),dlmReportsInstance.init()):dlmReportsInstance.fetchReportsData(e.offset)}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 o=await fetch(n);if(!o.ok)throw new Error("Something went wrong! Reports response did not come OK - "+o.statusText);e=await o.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),dlmReportsInstance.fetchReportsData()}init(){dlmReportsInstance.tabNagivation(),dlmReportsInstance.overViewTab(),dlmReportsInstance.togglePageSettings(),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 o=0,s=a.substring(0,7),r=n.substring(0,7);return Object.keys(e).map(e=>{e=e.substring(0,7);s!==e&&r!==e&&(s=e,o++),void 0===t[e]&&0==o%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],o=0;return Object.keys(e).map(e=>{a!==e&&n!==e&&(a=e,o++),void 0===t[e]&&0==o%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 o=new Date;o.setDate(o.getDate()-30),a=dlmReportsInstance.createDateElement(o)}if(void 0!==t&&t){e=new Date(t);n=dlmReportsInstance.createDateElement(e)}else{const s=new Date;s.setDate(s.getDate()+1),n=dlmReportsInstance.createDateElement(s)}return{startDate:a,endDate:n}}createDataOnDate(e,t){let{startDate:a,endDate:n}={...dlmReportsInstance.getSetDates(e,t)},o,s,r,d,l,m=(dlmReportsInstance.reportsData=void 0!==dlmReportsInstance.dlmReportsStats?JSON.parse(JSON.stringify(dlmReportsInstance.dlmReportsStats)):{},s=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(),o=moment(n).date()-moment(a).date(),dlmReportsInstance.chartType="day",0==r&&-6<s&&s<6?1<s||s<-1?dlmReportsInstance.chartType=2==s?"week":"weeks":1==s&&(8<o||-14<o||0==o)&&(dlmReportsInstance.chartType="days"):s<=0?dlmReportsInstance.chartType="month":dlmReportsInstance.chartType="months",dlmReportsInstance.getDates(new Date(a),new Date(n))),c,p,i,g;switch(dlmReportsInstance.chartType){case"months":p=dlmReportsInstance.getDoubleMonths(m),l=p;break;case"month":var u=dlmReportsInstance.getMonths(m);l=u;break;case"weeks":i=dlmReportsInstance.getWeeks(m),l=i;break;case"week":g=dlmReportsInstance.getWeek(m),l=g;break;case"days":c=dlmReportsInstance.getDoubleDays(m),l=c;break;case"day":l=m}Object.values(dlmReportsInstance.reportsData).forEach((o,e)=>{var s=JSON.parse(o.download_ids);if(void 0!==m[o.date])switch(dlmReportsInstance.chartType){case"months":d=o.date.substring(0,7);let e=parseInt(o.date.substring(5,7)),t=o.date.substring(0,5),a=6<(e-1).length?t+(e-1):t+"0"+(e-1);Object.values(s).forEach((e,t)=>{void 0===p[d]?void 0!==p[a]&&(p[a]=p[a]+e.downloads):p[d]=p[d]+e.downloads}),l=p;break;case"month":d=o.date.substring(0,7),Object.values(s).forEach((e,t)=>{monthDownloads[d]=void 0!==monthDownloads[d]?monthDownloads[d]+e.downloads:e.downloads}),l=monthDownloads;break;case"weeks":d=15<moment(o.date).date()?o.date.substring(0,7)+"-15":o.date.substring(0,7)+"-01",Object.values(s).forEach((e,t)=>{i[d]=void 0!==i[d]?i[d]+e.downloads:e.downloads}),l=i;break;case"week":d=o.date,Object.values(s).forEach((t,e)=>{if(void 0===g[d])for(let e=1;e<8;e++){var a=moment(o.date).date(moment(o.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=o.date;let n=moment(o.date).date(moment(o.date).date()-1).format("YYYY-MM-DD");Object.values(s).forEach((e,t)=>{void 0===c[d]?void 0!==c[n]&&(c[n]=c[n]+e.downloads):c[d]=c[d]+e.downloads}),l=c;break;case"day":Object.values(s).forEach((e,t)=>{m[o.date]=m[o.date]+e.downloads}),l=m}else delete dlmReportsInstance.reportsData[e]});const I=Object.keys(m);e=I.length,t=I.findIndex(e=>a===e);let R=I.findIndex(e=>n===e);-1===t&&-1===R?dlmReportsInstance.stats={chartStats:Object.assign({},l),summaryStats:!1,daysLength:e}:(-1===R&&(R=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 s=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=s[e],n=s[s.length-1],o=moment(n).month(moment(n).month()-1).format("YYYY-MM");return t="undefined"!==dlmReportsInstance.chartType&&"months"===dlmReportsInstance.chartType?(e=moment(s[e]).month())<11?a===o?moment(a).format("MMM, YYYY"):moment(a).format("MMM")+" - "+moment(a).month(e+1).format("MMM")+moment(a).format(", YYYY"):a===o||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 o=n.getDate()-1,s=n.getMonth()+1,r=s-1;var d=n.getFullYear(),l=(o<10&&(o="0"+o),s<10&&(s="0"+s),r<10&&(r="0"+r),d+"-"+s+"-"+o),d=d+"-"+r+"-"+o,m=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),m.append(a).append(dlmReportsInstance.startDateInput).append(dlmReportsInstance.endDateInput)):jQuery(document).trigger("dlm_create_date_picker_"+t.target,[dlmReportsInstance,m,a,d,l]),m}displayDatepicker(e,s){var t;if(jQuery(e)){if(t="#"+jQuery(e).attr("id").replace(/-/gi,"_"),"dlm-date-range-picker"===s.target){if(dlmReportsInstance.datePicker.opened)return;dlmReportsInstance.datePicker.opened=!0}else jQuery(document).trigger("dlm_display_datepicker_"+s.target,[dlmReportsInstance,s,e]);let o=dlmReportsInstance.createDatepicker(e,s,t);e.append(o);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_"+s.target,[dlmReportsInstance,s,e,n]),{separator:" to ",autoClose:!0,getValue:function(){},setValue:function(e,t,a){o.find('input[type="hidden"]').first().val(t),o.find('input[type="hidden"]').last().val(a)},inline:!0,alwaysOpen:!0,container:t,endDate:new Date,startDate:a,showShortcuts:!0,shortcuts:null,customShortcuts:n});o.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"}),o.parent().find("span.date-range-info").text(a+" - "+n)),"dlm-date-range-picker"===s.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_"+s.target,[dlmReportsInstance,t.date1,t.date2]),dlmReportsInstance.setTopDownloads(),o.data("dateRangePicker").close()}),"dlm-date-range-picker"===s.target?o.data("dateRangePicker").setDateRange(dlmReportsInstance.dates.downloads.start_date,dlmReportsInstance.dates.downloads.end_date):jQuery(document).trigger("dlm_daterangepicker_after_init_"+s.target,[o,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 o=JSON.parse(JSON.stringify(dlmReportsInstance.mostDownloaded)).slice(dlmReportsInstance.perPage*parseInt(e),dlmReportsInstance.perPage*parseInt(e+1));for(let e=0;e<o.length;e++){const r=dlmReportsInstance.getDownloadByID(o[e].id);if(void 0===r)return;var s={id:o[e].id,title:o[e].title,edit_link:dlmAdminUrl+"post.php?post="+o[e].id+"&action=edit",total_downloads:r.total.toLocaleString()};jQuery(document).trigger("dlm_reports_top_downloads_item_before_render",[s,dlmReportsInstance,o[e],r]),new dlmBackBone.modelTopDownloads(s)}n.parent().removeClass("empty"),a.find(".dlm-reports-total-pages").html(Math.ceil(dlmReportsInstance.mostDownloaded.length/dlmReportsInstance.perPage)),parseInt(dlmReportsInstance.perPage)!==parseInt(o.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),o=parseInt(a)+1,s=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:o,prevPage:s,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:o,link:s,nextPage:r,prevPage:d,prevButton:l,nextButton:m,doAction:c}={...e};let p=1;"load-more"===s.data("action")?(n.attr("data-page",r),c(r),Math.ceil(t.length/dlmReportsInstance.perPage)>r+1&&m.removeAttr("disabled"),l.removeAttr("disabled"),p=parseInt(r)+1):0!==parseInt(o)&&(n.attr("data-page",d),c(d),1!==parseInt(o)&&l.removeAttr("disabled"),m.removeAttr("disabled"),p=parseInt(d)+1),a.find(".dlm-reports-current-page").val(p)}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 m=l.title||[],c=document.createElement("div"),p=(c.className="dlm-reports-tooltip__header",m.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 o=dlmReportsInstance.setChartTooltipDate(l.dataPoints[0].label,d,d.stats.chartStats);n.appendChild(document.createTextNode(o)),t.appendChild(n);const s=document.createElement("p"),r=(s.className="dlm-reports-tooltip__downloads",document.createElement("span"));r.className="dlm-reports-tooltip__downloads_pointer",r.style.backgroundColor=dlmReportsInstance.chartColors.darkCyan.default,s.appendChild(r),s.appendChild(document.createTextNode(dlmReportsInstance.shortNumber(l.dataPoints[0].formattedValue))),t.appendChild(s),jQuery(document).trigger("dlm_chart_tooltip_after",[dlmReportsInstance,l,t,d]),c.appendChild(t)}),a.querySelector("div.dlm-reports-tooltip"));for(;p.firstChild;)p.firstChild.remove();p.appendChild(c)}var{offsetLeft:o,offsetTop:s}=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),o+l.caretX+l.width>e&&(r.isMargin=!0,r.left=!1),r.isMargin?r.left?a.style.left=o+l.width+"px":a.style.left=e-l.width+"px":a.style.left=o+l.caretX+"px",n.style.left=o+l.caretX+"px",a.style.top=s+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 o=dlmReportsInstance.getUserByID(t[e].user_id.toString()),s=dlmReportsInstance.getDownloadCPT(t[e].download_id.toString()),r={key:e,user:null!=o?o.display_name:"--",ip:t[e].user_ip,role:null!==o&&null!==o.role?o.role:"--",download:null!=s?s.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:null!=s?dlmAdminUrl+"post.php?post="+s.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],o,s]),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"),o=jQuery(this),s=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();o.attr("disabled","disabled");e={data:dlmReportsInstance.tempDownloads,main_parent:t,offsetHolder:a,offset:n,link:o,nextPage:s,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 o,s,r;return n="undefined"!==t.chartType&&"months"===t.chartType?(moment(e).year(),r=moment(e).month(),a=Object.keys(a)[Object.keys(a).length-1],o=moment(a).month(moment(a).month()-1).format("YYYY-MM"),s=moment(e).format("YYYY-MM"),r<11?s===o?moment(s).format("MMMM, YYYY"):moment(e).format("MMM")+" - "+moment(e).month(r+1).format("MMM")+moment(e).format(", YYYY"):s===o||s===a?moment(s).format("MMMM, YYYY"):moment(e).format("MMM")+moment(e).format(" YYYY")+" - "+moment(e).month(r+1).format("MMM")+moment(e).month(r+1).format(", YYYY")):"undefined"!==t.chartType&&"days"===t.chartType?(moment(e).year(),o=moment(e).day(),a=moment(e).format("MMMM"),s=moment(e).day(o+1).format("MMMM"),r=dlmReportsInstance.dates.downloads.end_date,t=moment(r).day(moment(r).day()-1).format("MMMM Do"),moment(e).format("MMMM Do")===moment(r).format("MMMM Do")||moment(e).format("MMMM Do")===t?moment(e).format("MMMM Do, YYYY"):a===s?moment(e).format("MMMM Do")+" - "+moment(e).day(o+1).format("Do")+moment(e).format(", YYYY"):moment(e).format("MMM Do")+" - "+moment(e).day(o+1).format("MMM Do")+moment(e).format(", 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){let e=null;return Array.isArray(dlmReportsInstance.mostDownloaded)&&(e=dlmReportsInstance.mostDownloaded.filter(e=>e.id===t,0)[0]),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,o){let s=parseInt(e.val()),r=(0===s&&(s=1),t.length<s*dlmReportsInstance.perPage&&(s=Math.ceil(t.length/dlmReportsInstance.perPage)),jQuery(this).next('button[data-action="load-more"]')),d=s+1,l=s-1,m=a.find(".downloads-block-navigation button").first(),c=a.find(".downloads-block-navigation button").last();r.attr("disabled","disabled");e={data:t,main_parent:a,offsetHolder:n,offset:s,link:r,nextPage:d,prevPage:l,prevButton:m,nextButton:c,doAction:o};dlmReportsInstance.handleSliderNavigation(e)}}
1
+ jQuery(function(e){new DLM_Reports;dlmReportsInstance.fetchDownloadsCPT()});class DLM_Reports{dlmReportsStats=[];dlmUsersStats={logs:[],users:[]};currentFilters=[];tempDownloads=null;templates={};totalDownloads=0;perPage=dlmReportsPerPage;downloads=[];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(e=0,t=1e3){const a=jQuery('div[data-id="general_info"]');dlmReportsInstance.setSpinner(jQuery(".total_downloads_chart-wrapper")),dlmReportsInstance.setSpinner(jQuery("#users_download_log")),dlmReportsInstance.setSpinner(jQuery("#total_downloads_table_wrapper2"));let n=dlmDownloadReportsAPI+"?offset="+e+"&limit="+t;0<dlmDownloadReportsAPI.indexOf("index.php?")&&(n=dlmDownloadReportsAPI+"&offset="+e+"&limit="+t);const s=await fetch(n);if(!s.ok){const o=document.createElement("div"),r=(o.className="dlm-loading-data",document.createTextNode("Seems like we bumped into an error! ")),d=document.createTextNode("Data fetching returned a status text of : "+fetchedData.statusText),l=document.createElement("h1"),m=document.createElement("h3");throw l.appendChild(r),m.appendChild(d),o.appendChild(l),o.appendChild(m),a.find(".dlm-loading-data").remove(),a.append(o),new Error("Something went wrong! Reports response did not come OK - "+fetchedData.statusText)}dlmReportsInstance.mostDownloaded=!1,dlmReportsInstance.stats=!1,dlmReportsInstance.chartType="day";e=await s.json();dlmReportsInstance.dlmReportsStats=dlmReportsInstance.dlmReportsStats.concat(e.stats),!0===e.done?(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]),dlmReportsInstance.stopSpinner(jQuery(".total_downloads_chart-wrapper")),dlmReportsInstance.init()):dlmReportsInstance.fetchReportsData(e.offset)}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),dlmReportsInstance.fetchReportsData()}init(){dlmReportsInstance.tabNagivation(),dlmReportsInstance.overViewTab(),dlmReportsInstance.togglePageSettings(),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.getTime()<t.getTime();)a[this.createDateElement(n)]=0,n=this.getNextDay(n);return a[this.createDateElement(n)]=0,n=this.getNextDay(n),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,m=(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))),c,p,i,g;switch(dlmReportsInstance.chartType){case"months":p=dlmReportsInstance.getDoubleMonths(m),l=p;break;case"month":var u=dlmReportsInstance.getMonths(m);l=u;break;case"weeks":i=dlmReportsInstance.getWeeks(m),l=i;break;case"week":g=dlmReportsInstance.getWeek(m),l=g;break;case"days":c=dlmReportsInstance.getDoubleDays(m),l=c;break;case"day":l=m}Object.values(dlmReportsInstance.reportsData).forEach((s,e)=>{var o=JSON.parse(s.download_ids);if(void 0!==m[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===p[d]?void 0!==p[a]&&(p[a]=p[a]+e.downloads):p[d]=p[d]+e.downloads}),l=p;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)=>{i[d]=void 0!==i[d]?i[d]+e.downloads:e.downloads}),l=i;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===c[d]?void 0!==c[n]&&(c[n]=c[n]+e.downloads):c[d]=c[d]+e.downloads}),l=c;break;case"day":Object.values(o).forEach((e,t)=>{m[s.date]=m[s.date]+e.downloads}),l=m}else delete dlmReportsInstance.reportsData[e]});const I=Object.keys(m);e=I.length,t=I.findIndex(e=>a===e);let R=I.findIndex(e=>n===e);-1===t&&-1===R?dlmReportsInstance.stats={chartStats:Object.assign({},l),summaryStats:!1,daysLength:e}:(-1===R&&(R=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,id:e}:{downloads:a[e].downloads+t.downloads,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));var e=dlmReportsInstance.getDownloadCPT(dlmReportsInstance.mostDownloaded[0].id);dlmReportsInstance.setMostDownloaded(e.title.rendered)}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,m=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),m.append(a).append(dlmReportsInstance.startDateInput).append(dlmReportsInstance.endDateInput)):jQuery(document).trigger("dlm_create_date_picker_"+t.target,[dlmReportsInstance,m,a,d,l]),m}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);var o=dlmReportsInstance.getDownloadCPT(s[e].id);if(void 0===r)return;o={id:s[e].id,title:dlmReportsInstance.htmlEntities(o.title.rendered),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:m,doAction:c}={...e};let p=1;"load-more"===o.data("action")?(n.attr("data-page",r),c(r),Math.ceil(t.length/dlmReportsInstance.perPage)>r+1&&m.removeAttr("disabled"),l.removeAttr("disabled"),p=parseInt(r)+1):0!==parseInt(s)&&(n.attr("data-page",d),c(d),1!==parseInt(s)&&l.removeAttr("disabled"),m.removeAttr("disabled"),p=parseInt(d)+1),a.find(".dlm-reports-current-page").val(p)}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 m=l.title||[],c=document.createElement("div"),p=(c.className="dlm-reports-tooltip__header",m.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]),c.appendChild(t)}),a.querySelector("div.dlm-reports-tooltip"));for(;p.firstChild;)p.firstChild.remove();p.appendChild(c)}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:null!=o?dlmReportsInstance.htmlEntities(o.title.rendered):"--",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:null!=o?dlmAdminUrl+"post.php?post="+o.id+"&action=edit":"#",status:t[e].download_status,download_date:t[e].display_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(),r=moment(e).month(),a=Object.keys(a)[Object.keys(a).length-1],s=moment(a).month(moment(a).month()-1).format("YYYY-MM"),o=moment(e).format("YYYY-MM"),r<11?o===s?moment(o).format("MMMM, YYYY"):moment(e).format("MMM")+" - "+moment(e).month(r+1).format("MMM")+moment(e).format(", YYYY"):o===s||o===a?moment(o).format("MMMM, YYYY"):moment(e).format("MMM")+moment(e).format(" YYYY")+" - "+moment(e).month(r+1).format("MMM")+moment(e).month(r+1).format(", YYYY")):"undefined"!==t.chartType&&"days"===t.chartType?(moment(e).year(),s=moment(e).day(),a=moment(e).format("MMMM"),o=moment(e).day(s+1).format("MMMM"),r=dlmReportsInstance.dates.downloads.end_date,t=moment(r).day(moment(r).day()-1).format("MMMM Do"),moment(e).format("MMMM Do")===moment(r).format("MMMM Do")||moment(e).format("MMMM Do")===t?moment(e).format("MMMM Do, YYYY"):a===o?moment(e).format("MMMM Do")+" - "+moment(e).day(s+1).format("Do")+moment(e).format(", YYYY"):moment(e).format("MMM Do")+" - "+moment(e).day(s+1).format("MMM Do")+moment(e).format(", 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){let e=null;return Array.isArray(dlmReportsInstance.downloads)&&(e=dlmReportsInstance.downloads.filter(e=>parseInt(e.id)===parseInt(t),0)[0]),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,m=a.find(".downloads-block-navigation button").first(),c=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:m,nextButton:c,doAction:s};dlmReportsInstance.handleSliderNavigation(e)}htmlEntities(e){var t=document.getElementById("dlm_reports_decode_area");return t.innerHTML=e,t.value}async fetchDownloadsCPT(){const e=await fetch(dlmDownloadsCptApiapi);if(!e.ok)throw new Error("Something went wrong! Reports response did not come OK - "+e.statusText);dlmReportsInstance.downloads=await e.json(),dlmReportsInstance.fetchUserData()}}
assets/js/select2/select2.min.css CHANGED
@@ -1 +1 @@
1
- .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
1
+ .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{background-color:transparent;border:none;font-size:1em}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline;list-style:none;padding:0}.select2-container .select2-selection--multiple .select2-selection__clear{background-color:transparent;border:none;font-size:1em}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;margin-left:5px;padding:0;max-width:100%;resize:none;height:18px;vertical-align:bottom;font-family:sans-serif;overflow:hidden;word-break:keep-all}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option--selectable{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px;padding-right:0px}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;padding-bottom:5px;padding-right:5px;position:relative}.select2-container--default .select2-selection--multiple.select2-selection--clearable{padding-right:25px}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;font-weight:bold;height:20px;margin-right:10px;margin-top:5px;position:absolute;right:0;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:inline-block;margin-left:5px;margin-top:5px;padding:0;padding-left:20px;position:relative;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}.select2-container--default .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-right:1px solid #aaa;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#999;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px;position:absolute;left:0;top:0}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover,.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus{background-color:#f1f1f1;color:#333;outline:none}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{border-left:1px solid #aaa;border-right:none;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__clear{float:left;margin-left:10px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--group{padding:0}.select2-container--default .select2-results__option--disabled{color:#999}.select2-container--default .select2-results__option--selected{background-color:#ddd}.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0;padding-bottom:5px;padding-right:5px}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;display:inline-block;margin-left:5px;margin-top:5px;padding:0}.select2-container--classic .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#888;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555;outline:none}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option--group{padding:0}.select2-container--classic .select2-results__option--disabled{color:grey}.select2-container--classic .select2-results__option--highlighted.select2-results__option--selectable{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
assets/js/select2/select2.min.js CHANGED
@@ -1 +1,2 @@
1
- /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),k-=1;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if(n=p(c[o],t),"require"===(k=n.f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)h=w[o]=q.module(a);else if(e(r,k)||e(s,k)||e(u,k))w[o]=j(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,g(f,!0),i(k),{}),w[o]=r[k]}m=d?d.apply(r[a],w):void 0,a&&(h&&h.exports!==b&&h.exports!==r[a]?r[a]=h.exports:m===b&&v||(r[a]=m))}else a&&(r[a]=d)},a=c=o=function(a,c,d,e,f){if("string"==typeof a)return q[a]?q[a](c):j(p(a,l(c)).f);if(!a.splice){if(t=a,t.deps&&o(t.deps,t.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?n(b,a,c,d):setTimeout(function(){n(b,a,c,d)},4),o},o.config=function(a){return o(a)},a._defined=r,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(r,a)||e(s,a)||(s[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){"function"==typeof b[d]&&("constructor"!==d&&c.push(d))}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){return Array.prototype.unshift.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;c<d;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;c<a;c++){b+=Math.floor(36*Math.random()).toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return(e!==f||"hidden"!==f&&"visible"!==f)&&("scroll"===e||"scroll"===f||(d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth))},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()});b.$results.find(".select2-results__option[aria-selected]").each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):h-g<0&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");if("true"===c.attr("aria-selected"))return void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{}));d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2");a(".select2.select2-container--open").each(function(){var b=a(this);this!=d[0]&&b.data("element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id;if(b.length>1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||c.which!=b.DELETE&&c.which!=b.BACKSPACE||this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===e.$search.val()){var b=e.$searchContainer.prev(".select2-selection__choice");if(b.length>0){var d=b.data("data");e.searchRemoveChoice(d),a.preventDefault()}}});var f=document.documentMode,g=f&&f<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(g)return void e.$selection.off("input.search input.searchcheck");e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("change");this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})}},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this;this.$element.children().each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),void 0!==a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(null!=(b=c.data(a[0],"data")))return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(a.data=g,void c(a))}if(f)return!0;var k=e.createTag(b);if(null!=k){var l=e.option(k);l.attr("data-select2-tag",!0),e.addOptions([l]),e.insertTag(g,k)}a.results=g,c(a)}var e=this;if(this._removeOldTags(),null==b.term||null!=b.page)return void a.call(this,b,c);a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b);if(!g.$element.find("option").filter(function(){return a(this).val()===c.id}).length){var d=g.option(c);d.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([d])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){if(b.term=b.term||"",b.term.length<this.minimumInputLength)return void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){if(b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()||e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return!(a(c.data.results)<this.minimumResultsForSearch)&&b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}return D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(a){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(a){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var O=k.loadPath(this.defaults.amdLanguageBase+"en"),P=new k(l.language);P.extend(O),l.translations=P}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h<i;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+ !function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(t){var e,n,s,p,r,o,h,f,g,m,y,v,i,a,_,s=(t&&t.fn&&t.fn.select2&&t.fn.select2.amd&&(u=t.fn.select2.amd),u&&u.requirejs||(u?n=u:u={},g={},m={},y={},v={},i=Object.prototype.hasOwnProperty,a=[].slice,_=/\.js$/,h=function(e,t){var n,s,i=c(e),r=i[0],t=t[1];return e=i[1],r&&(n=x(r=l(r,t))),r?e=n&&n.normalize?n.normalize(e,(s=t,function(e){return l(e,s)})):l(e,t):(r=(i=c(e=l(e,t)))[0],e=i[1],r&&(n=x(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},f={require:function(e){return w(e)},exports:function(e){var t=g[e];return void 0!==t?t:g[e]={}},module:function(e){return{id:e,uri:"",exports:g[e],config:(t=e,function(){return y&&y.config&&y.config[t]||{}})};var t}},r=function(e,t,n,s){var i,r,o,a,l,c=[],u=typeof n,d=A(s=s||e);if("undefined"==u||"function"==u){for(t=!t.length&&n.length?["require","exports","module"]:t,a=0;a<t.length;a+=1)if("require"===(r=(o=h(t[a],d)).f))c[a]=f.require(e);else if("exports"===r)c[a]=f.exports(e),l=!0;else if("module"===r)i=c[a]=f.module(e);else if(b(g,r)||b(m,r)||b(v,r))c[a]=x(r);else{if(!o.p)throw new Error(e+" missing "+r);o.p.load(o.n,w(s,!0),function(t){return function(e){g[t]=e}}(r),{}),c[a]=g[r]}u=n?n.apply(g[e],c):void 0,e&&(i&&i.exports!==p&&i.exports!==g[e]?g[e]=i.exports:u===p&&l||(g[e]=u))}else e&&(g[e]=n)},e=n=o=function(e,t,n,s,i){if("string"==typeof e)return f[e]?f[e](t):x(h(e,A(t)).f);if(!e.splice){if((y=e).deps&&o(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=s,s=i),s?r(p,e,t,n):setTimeout(function(){r(p,e,t,n)},4),o},o.config=function(e){return o(e)},e._defined=g,(s=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),b(g,e)||b(m,e)||(m[e]=[e,t,n])}).amd={jQuery:!0},u.requirejs=e,u.require=n,u.define=s),u.define("almond",function(){}),u.define("jquery",[],function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),u.define("select2/utils",["jquery"],function(r){var s={};function c(e){var t,n=e.prototype,s=[];for(t in n)"function"==typeof n[t]&&"constructor"!==t&&s.push(t);return s}s.Extend=function(e,t){var n,s={}.hasOwnProperty;function i(){this.constructor=e}for(n in t)s.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},s.Decorate=function(s,i){var e=c(i),t=c(s);function r(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=s.prototype.constructor;0<t&&(e.call(arguments,s.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=s.displayName,r.prototype=new function(){this.constructor=r};for(var n=0;n<t.length;n++){var o=t[n];r.prototype[o]=s.prototype[o]}for(var a=0;a<e.length;a++){var l=e[a];r.prototype[l]=function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}(l)}return r};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,s=e.length;n<s;n++)e[n].apply(this,t)},s.Observable=e,s.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},s.bind=function(e,t){return function(){e.apply(t,arguments)}},s._convertData=function(e){for(var t in e){var n=t.split("-"),s=e;if(1!==n.length){for(var i=0;i<n.length;i++){var r=n[i];(r=r.substring(0,1).toLowerCase()+r.substring(1))in s||(s[r]={}),i==n.length-1&&(s[r]=e[t]),s=s[r]}delete e[t]}}return e},s.hasScroll=function(e,t){var n=r(t),s=t.style.overflowX,i=t.style.overflowY;return(s!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===s||"scroll"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},s.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},s.__cache={};var n=0;return s.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null!=t||(t=e.id?"select2-data-"+e.id:"select2-data-"+(++n).toString()+"-"+s.generateChars(4),e.setAttribute("data-select2-id",t)),t},s.StoreData=function(e,t,n){e=s.GetUniqueElementId(e);s.__cache[e]||(s.__cache[e]={}),s.__cache[e][t]=n},s.GetData=function(e,t){var n=s.GetUniqueElementId(e);return t?s.__cache[n]&&null!=s.__cache[n][t]?s.__cache[n][t]:r(e).data(t):s.__cache[n]},s.RemoveData=function(e){var t=s.GetUniqueElementId(e);null!=s.__cache[t]&&delete s.__cache[t],e.removeAttribute("data-select2-id")},s.copyNonInternalCssClasses=function(e,t){var n=(n=e.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0===e.indexOf("select2-")}),t=(t=t.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0!==e.indexOf("select2-")}),t=n.concat(t);e.setAttribute("class",t.join(" "))},s}),u.define("select2/results",["jquery","./utils"],function(d,p){function s(e,t,n){this.$element=e,this.data=n,this.options=t,s.__super__.constructor.call(this)}return p.Extend(s,p.Observable),s.prototype.render=function(){var e=d('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},s.prototype.clear=function(){this.$results.empty()},s.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=d('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),s=this.options.get("translations").get(e.message);n.append(t(s(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},s.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},s.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var s=e.results[n],s=this.option(s);t.push(s)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},s.prototype.position=function(e,t){t.find(".select2-results").append(e)},s.prototype.sort=function(e){return this.options.get("sorter")(e)},s.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option--selectable"),t=e.filter(".select2-results__option--selected");(0<t.length?t:e).first().trigger("mouseenter"),this.ensureHighlightVisible()},s.prototype.setClasses=function(){var t=this;this.data.current(function(e){var s=e.map(function(e){return e.id.toString()});t.$results.find(".select2-results__option--selectable").each(function(){var e=d(this),t=p.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<s.indexOf(n)?(this.classList.add("select2-results__option--selected"),e.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),e.attr("aria-selected","false"))})})},s.prototype.showLoading=function(e){this.hideLoading();e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},e=this.option(e);e.className+=" loading-results",this.$results.prepend(e)},s.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},s.prototype.option=function(e){var t=document.createElement("li");t.classList.add("select2-results__option"),t.classList.add("select2-results__option--selectable");var n,s={role:"option"},i=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(n in(null!=e.element&&i.call(e.element,":disabled")||null==e.element&&e.disabled)&&(s["aria-disabled"]="true",t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--disabled")),null==e.id&&t.classList.remove("select2-results__option--selectable"),null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(s.role="group",s["aria-label"]=e.text,t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--group")),s){var r=s[n];t.setAttribute(n,r)}if(e.children){var o=d(t),a=document.createElement("strong");a.className="select2-results__group",this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],u=this.option(u);l.push(u)}i=d("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"});i.append(l),o.append(a),o.append(i)}else this.template(e,t);return p.StoreData(t,"data",e),t},s.prototype.bind=function(t,e){var i=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e,t=i.getHighlightedResults();0!==t.length&&(e=p.GetData(t[0],"data"),t.hasClass("select2-results__option--selected")?i.trigger("close",{}):i.trigger("select",{data:e}))}),t.on("results:previous",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t);s<=0||(e=s-1,0===t.length&&(e=0),(s=n.eq(e)).trigger("mouseenter"),t=i.$results.offset().top,n=s.offset().top,s=i.$results.scrollTop()+(n-t),0===e?i.$results.scrollTop(0):n-t<0&&i.$results.scrollTop(s))}),t.on("results:next",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t)+1;s>=n.length||((e=n.eq(s)).trigger("mouseenter"),t=i.$results.offset().top+i.$results.outerHeight(!1),n=e.offset().top+e.outerHeight(!1),e=i.$results.scrollTop()+n-t,0===s?i.$results.scrollTop(0):t<n&&i.$results.scrollTop(e))}),t.on("results:focus",function(e){e.element[0].classList.add("select2-results__option--highlighted"),e.element[0].setAttribute("aria-selected","true")}),t.on("results:message",function(e){i.displayMessage(e)}),d.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,t=0<e.deltaY&&t-e.deltaY<=0,n=e.deltaY<0&&n<=i.$results.height();t?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):n&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option--selectable",function(e){var t=d(this),n=p.GetData(this,"data");t.hasClass("select2-results__option--selected")?i.options.get("multiple")?i.trigger("unselect",{originalEvent:e,data:n}):i.trigger("close",{}):i.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".select2-results__option--selectable",function(e){var t=p.GetData(this,"data");i.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),i.trigger("results:focus",{data:t,element:d(this)})})},s.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},s.prototype.destroy=function(){this.$results.remove()},s.prototype.ensureHighlightVisible=function(){var e,t,n,s,i=this.getHighlightedResults();0!==i.length&&(e=this.$results.find(".select2-results__option--selectable").index(i),s=this.$results.offset().top,t=i.offset().top,n=this.$results.scrollTop()+(t-s),s=t-s,n-=2*i.outerHeight(!1),e<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(n))},s.prototype.template=function(e,t){var n=this.options.get("templateResult"),s=this.options.get("escapeMarkup"),e=n(e,t);null==e?t.style.display="none":"string"==typeof e?t.innerHTML=s(e):d(t).append(e)},s}),u.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),u.define("select2/selection/base",["jquery","../utils","../keys"],function(n,s,i){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return s.Extend(r,s.Observable),r.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=s.GetData(this.$element[0],"old-tabindex")?this._tabindex=s.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},r.prototype.bind=function(e,t){var n=this,s=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",s),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},r.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},r.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&s.GetData(this,"element").select2("close")})})},r.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},r.prototype.position=function(e,t){t.find(".selection").append(e)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r}),u.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,s){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var s=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",s),this.$selection.attr("aria-controls",s),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){var t,n;0!==e.length?(n=e[0],t=this.$selection.find(".select2-selection__rendered"),e=this.display(n,t),t.empty().append(e),(n=n.title||n.text)?t.attr("title",n):t.removeAttr("title")):this.clear()},i}),u.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,c){function r(e,t){r.__super__.constructor.apply(this,arguments)}return c.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var s=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){var t;n.isDisabled()||(t=i(this).parent(),t=c.GetData(t[0],"data"),n.trigger("unselect",{originalEvent:e,data:t}))}),this.$selection.on("keydown",".select2-selection__choice__remove",function(e){n.isDisabled()||e.stopPropagation()})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;</span></button><span class="select2-selection__choice__display"></span></li>')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",s=0;s<e.length;s++){var i=e[s],r=this.selectionContainer(),o=this.display(i,r),a=n+c.generateChars(4)+"-";i.id?a+=i.id:a+=c.generateChars(4),r.find(".select2-selection__choice__display").append(o).attr("id",a);var l=i.title||i.text;l&&r.attr("title",l);o=this.options.get("translations").get("removeItem"),l=r.find(".select2-selection__choice__remove");l.attr("title",o()),l.attr("aria-label",o()),l.attr("aria-describedby",a),c.StoreData(r[0],"data",i),t.push(r)}this.$selection.find(".select2-selection__rendered").append(t)}},r}),u.define("select2/selection/placeholder",[],function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();n.html(this.display(t)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice");t=t.title||t.text||n.text();return this.$selection.find(".select2-selection__rendered").attr("title",t),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();t=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(t)},e}),u.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(i,s,a){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){s._handleClear(e)}),t.on("keypress",function(e){s._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var s=a.GetData(n[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var r={data:s};if(this.trigger("clear",r),r.prevented)this.$element.val(i);else{for(var o=0;o<s.length;o++)if(r={data:s[o]},this.trigger("unselect",r),r.prevented)return void this.$element.val(i);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=s.DELETE&&t.which!=s.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){var n,s;e.call(this,t),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),0<this.$selection.find(".select2-selection__placeholder").length||0===t.length||(n=this.$selection.find(".select2-selection__rendered").attr("id"),s=this.options.get("translations").get("removeAllItems"),(e=i('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;</span></button>')).attr("title",s()),e.attr("aria-label",s()),e.attr("aria-describedby",n),a.StoreData(e[0],"data",t),this.$selection.prepend(e),this.$selection[0].classList.add("select2-selection--clearable"))},e}),u.define("select2/selection/search",["jquery","../utils","../keys"],function(s,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=this.options.get("translations").get("search"),n=s('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');this.$searchContainer=n,this.$search=n.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",t());e=e.call(this);return this._transferTabIndex(),e.append(this.$searchContainer),e},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results",r=t.id+"-container";e.call(this,t,n),s.$search.attr("aria-describedby",r),t.on("open",function(){s.$search.attr("aria-controls",i),s.$search.trigger("focus")}),t.on("close",function(){s.$search.val(""),s.resizeSearch(),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.trigger("focus")}),t.on("enable",function(){s.$search.prop("disabled",!1),s._transferTabIndex()}),t.on("disable",function(){s.$search.prop("disabled",!0)}),t.on("focus",function(e){s.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){s.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){s._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){var t;e.stopPropagation(),s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented(),e.which!==l.BACKSPACE||""!==s.$search.val()||0<(t=s.$selection.find(".select2-selection__choice").last()).length&&(t=a.GetData(t[0],"data"),s.searchRemoveChoice(t),e.preventDefault())}),this.$selection.on("click",".select2-search--inline",function(e){s.$search.val()&&e.stopPropagation()});var t=document.documentMode,o=t&&t<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){o?s.$selection.off("input.search input.searchcheck"):s.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){var t;o&&"input"===e.type?s.$selection.off("input.search input.searchcheck"):(t=e.which)!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&s.handleSearch(e)})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){var e;this.resizeSearch(),this._keyUpPrevented||(e=this.$search.val(),this.trigger("query",{term:e})),this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";""===this.$search.attr("placeholder")&&(e=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",e)},e}),u.define("select2/selection/selectionCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("selectionCssClass")||"";return-1!==e.indexOf(":all:")&&(e=e.replace(":all:",""),n.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/selection/eventRelay",["jquery"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var s=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],r=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){var n;-1!==i.indexOf(e)&&(t=t||{},n=o.Event("select2:"+e,{params:t}),s.$element.trigger(n),-1!==r.indexOf(e)&&(t.prevented=n.isDefaultPrevented()))})},e}),u.define("select2/translation",["jquery","require"],function(t,n){function s(e){this.dict=e||{}}return s.prototype.all=function(){return this.dict},s.prototype.get=function(e){return this.dict[e]},s.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},s._cache={},s.loadPath=function(e){var t;return e in s._cache||(t=n(e),s._cache[e]=t),new s(s._cache[e])},s}),u.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),u.define("select2/data/base",["../utils"],function(n){function s(e,t){s.__super__.constructor.call(this)}return n.Extend(s,n.Observable),s.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},s.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},s.prototype.bind=function(e,t){},s.prototype.destroy=function(){},s.prototype.generateResultId=function(e,t){e=e.id+"-result-";return e+=n.generateChars(4),null!=t.id?e+="-"+t.id.toString():e+="-"+n.generateChars(4),e},s}),u.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var t=this;e(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(e){return t.item(l(e))}))},n.prototype.select=function(i){var e,r=this;if(i.selected=!0,null!=i.element&&"option"===i.element.tagName.toLowerCase())return i.element.selected=!0,void this.$element.trigger("input").trigger("change");this.$element.prop("multiple")?this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var s=i[n].id;-1===t.indexOf(s)&&t.push(s)}r.$element.val(t),r.$element.trigger("input").trigger("change")}):(e=i.id,this.$element.val(e),this.$element.trigger("input").trigger("change"))},n.prototype.unselect=function(i){var r=this;if(this.$element.prop("multiple")){if(i.selected=!1,null!=i.element&&"option"===i.element.tagName.toLowerCase())return i.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var s=e[n].id;s!==i.id&&-1===t.indexOf(s)&&t.push(s)}r.$element.val(t),r.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(t,e){var n=[],s=this;this.$element.children().each(function(){var e;"option"!==this.tagName.toLowerCase()&&"optgroup"!==this.tagName.toLowerCase()||(e=l(this),e=s.item(e),null!==(e=s.matches(t,e))&&n.push(e))}),e({results:n})},n.prototype.addOptions=function(e){this.$element.append(e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);e=this._normalizeItem(e);return e.element=t,a.StoreData(t,"data",e),l(t)},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;var n=e[0];if("option"===n.tagName.toLowerCase())t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if("optgroup"===n.tagName.toLowerCase()){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var s=e.children("option"),i=[],r=0;r<s.length;r++){var o=l(s[r]),o=this.item(o);i.push(o)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),u.define("select2/data/array",["./select","../utils","jquery"],function(e,t,c){function s(e,t){this._dataToConvert=t.get("data")||[],s.__super__.constructor.call(this,e,t)}return t.Extend(s,e),s.prototype.bind=function(e,t){s.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},s.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),s.__super__.select.call(this,n)},s.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),s=n.map(function(){return t.item(c(this)).id}).get(),i=[];for(var r=0;r<e.length;r++){var o,a,l=this._normalizeItem(e[r]);0<=s.indexOf(l.id)?(o=n.filter(function(e){return function(){return c(this).val()==e.id}}(l)),a=this.item(o),a=c.extend(!0,{},l,a),a=this.option(a),o.replaceWith(a)):(a=this.option(l),l.children&&(l=this.convertToOptions(l.children),a.append(l)),i.push(a))}return i},s}),u.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,r){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return r.extend({},e,{q:e.term})},transport:function(e,t,n){e=r.ajax(e);return e.then(t),e.fail(n),e}};return r.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(t,n){var s=this;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);var i=r.extend({type:"GET"},this.ajaxOptions);function e(){var e=i.transport(i,function(e){e=s.processResults(e,t);s.options.get("debug")&&window.console&&console.error&&(e&&e.results&&Array.isArray(e.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),n(e)},function(){"status"in e&&(0===e.status||"0"===e.status)||s.trigger("results:message",{message:"errorLoading"})});s._request=e}"function"==typeof i.url&&(i.url=i.url.call(this.$element,t)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),u.define("select2/data/tags",["jquery"],function(t){function e(e,t,n){var s=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);i=n.get("insertTag");if(void 0!==i&&(this.insertTag=i),e.call(this,t,n),Array.isArray(s))for(var r=0;r<s.length;r++){var o=s[r],o=this._normalizeItem(o),o=this.option(o);this.$element.append(o)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var s=t.results,i=0;i<s.length;i++){var r=s[i],o=null!=r.children&&!e({results:r.children},!0);if((r.text||"").toUpperCase()===(c.term||"").toUpperCase()||o)return!n&&(t.data=s,void u(t))}if(n)return!0;var a,l=d.createTag(c);null!=l&&((a=d.option(l)).attr("data-select2-tag","true"),d.addOptions([a]),d.insertTag(s,l)),t.results=s,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){if(null==t.term)return null;t=t.term.trim();return""===t?null:{id:t,text:t}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||t(this).remove()})},e}),u.define("select2/data/tokenizer",["jquery"],function(c){function e(e,t,n){var s=n.get("tokenizer");void 0!==s&&(this.tokenizer=s),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var s=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=s._normalizeItem(e);s.$element.find("option").filter(function(){return c(this).val()===n.id}).length||((t=s.option(n)).attr("data-select2-tag",!0),s._removeOldTags(),s.addOptions([t])),t=n,s.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.trigger("focus")),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,s){for(var i=n.get("tokenSeparators")||[],r=t.term,o=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};o<r.length;){var l=r[o];-1!==i.indexOf(l)?(l=r.substr(0,o),null!=(l=a(c.extend({},t,{term:l})))?(s(l),r=r.substr(o+1)||"",o=0):o++):o++}return{term:r}},e}),u.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(){s._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var s=this;this._checkIfMaximumSelected(function(){e.call(s,t,n)})},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current(function(e){e=null!=e?e.length:0;0<n.maximumSelectionLength&&e>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()})},e}),u.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),u.define("select2/dropdown/search",["jquery"],function(r){function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("translations").get("search"),e=r('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=e,this.$search=e.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n()),t.prepend(e),t},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){s.handleSearch(e)}),t.on("open",function(){s.$search.attr("tabindex",0),s.$search.attr("aria-controls",i),s.$search.trigger("focus"),window.setTimeout(function(){s.$search.trigger("focus")},0)}),t.on("close",function(){s.$search.attr("tabindex",-1),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.val(""),s.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||s.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(s.showSearch(e)?s.$searchContainer[0].classList.remove("select2-search--hide"):s.$searchContainer[0].classList.add("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")})},e.prototype.handleSearch=function(e){var t;this._keyUpPrevented||(t=this.$search.val(),this.trigger("query",{term:t})),this._keyUpPrevented=!1},e.prototype.showSearch=function(e,t){return!0},e}),u.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,s){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,s)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),s=t.length-1;0<=s;s--){var i=t[s];this.placeholder.id===i.id&&n.splice(s,1)}return n},e}),u.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,s){this.lastParams={},e.call(this,t,n,s),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("query",function(e){s.lastParams=e,s.loading=!0}),t.on("query:append",function(e){s.lastParams=e,s.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&e&&(e=this.$results.offset().top+this.$results.outerHeight(!1),this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=e+50&&this.loadMore())},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),u.define("select2/dropdown/attachBody",["jquery","../utils"],function(u,o){function e(e,t,n){this.$dropdownParent=u(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("open",function(){s._showDropdown(),s._attachPositioningHandler(t),s._bindContainerResultHandlers(t)}),t.on("close",function(){s._hideDropdown(),s._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=u("<span></span>"),e=e.call(this);return t.append(e),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){var n;this._containerResultsHandlersBound||(n=this,t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0)},e.prototype._attachPositioningHandler=function(e,t){var n=this,s="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id,t=this.$container.parents().filter(o.hasScroll);t.each(function(){o.StoreData(this,"select2-scroll-position",{x:u(this).scrollLeft(),y:u(this).scrollTop()})}),t.on(s,function(e){var t=o.GetData(this,"select2-scroll-position");u(this).scrollTop(t.y)}),u(window).on(s+" "+i+" "+r,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,s="resize.select2."+t.id,t="orientationchange.select2."+t.id;this.$container.parents().filter(o.hasScroll).off(n),u(window).off(n+" "+s+" "+t)},e.prototype._positionDropdown=function(){var e=u(window),t=this.$dropdown[0].classList.contains("select2-dropdown--above"),n=this.$dropdown[0].classList.contains("select2-dropdown--below"),s=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=i.top,r.bottom=i.top+r.height;var o=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-o,e=l>i.bottom+o,a={left:i.left,top:r.bottom},l=this.$dropdownParent;"static"===l.css("position")&&(l=l.offsetParent());i={top:0,left:0};(u.contains(document.body,l[0])||l[0].isConnected)&&(i=l.offset()),a.top-=i.top,a.left-=i.left,t||n||(s="below"),e||!c||t?!c&&e&&t&&(s="below"):s="above",("above"==s||t&&"below"!==s)&&(a.top=r.top-i.top-o),null!=s&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+s),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+s)),this.$dropdownContainer.css(a)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),u.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,s){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,s)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,s=0;s<t.length;s++){var i=t[s];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),u.define("select2/dropdown/selectOnClose",["../utils"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("close",function(e){s._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}n=this.getHighlightedResults();n.length<1||(null!=(n=s.GetData(n[0],"data")).element&&n.element.selected||null==n.element&&n.selected||this.trigger("select",{data:n}))},e}),u.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(e){s._selectTriggered(e)}),t.on("unselect",function(e){s._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),u.define("select2/dropdown/dropdownCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("dropdownCssClass")||"";return-1!==e.indexOf(":all:")&&(e=e.replace(":all:",""),n.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/dropdown/tagsSearchHighlight",["../utils"],function(s){function e(){}return e.prototype.highlightFirstItem=function(e){var t=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)");if(0<t.length){var n=t.first(),t=s.GetData(n[0],"data").element;if(t&&t.getAttribute&&"true"===t.getAttribute("data-select2-tag"))return void n.trigger("mouseenter")}e.call(this)},e}),u.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,e="Please delete "+t+" character";return 1!=t&&(e+="s"),e},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}}),u.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],function(l,r,o,a,c,u,d,p,h,f,g,t,m,y,v,_,b,$,w,x,A,D,S,E,O,C,L,T,q,I,e){function n(){this.reset()}return n.prototype.apply=function(e){var t;null==(e=l.extend(!0,{},this.defaults,e)).dataAdapter&&(null!=e.ajax?e.dataAdapter=v:null!=e.data?e.dataAdapter=y:e.dataAdapter=m,0<e.minimumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,$)),0<e.maximumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,w)),0<e.maximumSelectionLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,x)),e.tags&&(e.dataAdapter=f.Decorate(e.dataAdapter,_)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=f.Decorate(e.dataAdapter,b))),null==e.resultsAdapter&&(e.resultsAdapter=r,null!=e.ajax&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,E)),null!=e.placeholder&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,S)),e.selectOnClose&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,L)),e.tags&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter&&(e.multiple?e.dropdownAdapter=A:(t=f.Decorate(A,D),e.dropdownAdapter=t),0!==e.minimumResultsForSearch&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,C)),e.closeOnSelect&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,T)),null!=e.dropdownCssClass&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,q)),e.dropdownAdapter=f.Decorate(e.dropdownAdapter,O)),null==e.selectionAdapter&&(e.multiple?e.selectionAdapter=a:e.selectionAdapter=o,null!=e.placeholder&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,c)),e.allowClear&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,u)),e.multiple&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,d)),null!=e.selectionCssClass&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,p)),e.selectionAdapter=f.Decorate(e.selectionAdapter,h)),e.language=this._resolveLanguage(e.language),e.language.push("en");for(var n=[],s=0;s<e.language.length;s++){var i=e.language[s];-1===n.indexOf(i)&&n.push(i)}return e.language=n,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:f.escapeMarkup,language:{},matcher:function e(t,n){if(null==t.term||""===t.term.trim())return n;if(n.children&&0<n.children.length){for(var s=l.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&s.children.splice(i,1);return 0<s.children.length?s:e(t,s)}var r=a(n.text).toUpperCase(),o=a(t.term).toUpperCase();return-1<r.indexOf(o)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,s=this.defaults.language,i=t.prop("lang"),t=t.closest("[lang]").prop("lang"),t=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(s),this._resolveLanguage(t));return e.language=t,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(l.isEmptyObject(e))return[];if(l.isPlainObject(e))return[e];for(var t,n=Array.isArray(e)?e:[e],s=[],i=0;i<n.length;i++)s.push(n[i]),"string"==typeof n[i]&&0<n[i].indexOf("-")&&(t=n[i].split("-")[0],s.push(t));return s},n.prototype._processTranslations=function(e,t){for(var n=new g,s=0;s<e.length;s++){var i=new g,r=e[s];if("string"==typeof r)try{i=g.loadPath(r)}catch(e){try{r=this.defaults.amdLanguageBase+r,i=g.loadPath(r)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+r+'" could not be automatically loaded. A fallback will be used instead.')}}else i=l.isPlainObject(r)?new g(r):r;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[l.camelCase(e)]=t;n=f._convertData(n);l.extend(!0,this.defaults,n)},new n}),u.define("select2/options",["jquery","./defaults","./utils"],function(c,n,u){function e(e,t){this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=n.applyFromElement(this.options,t)),this.options=n.apply(this.options)}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.autocomplete&&e.prop("autocomplete")&&(this.options.autocomplete=e.prop("autocomplete")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),u.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),u.StoreData(e[0],"data",u.GetData(e[0],"select2Tags")),u.StoreData(e[0],"tags",!0)),u.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",u.GetData(e[0],"ajaxUrl")),u.StoreData(e[0],"ajax-Url",u.GetData(e[0],"ajaxUrl")));var n={};function s(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var r=e[0].attributes[i].name,o="data-";r.substr(0,o.length)==o&&(r=r.substring(o.length),o=u.GetData(e[0],r),n[r.replace(/-([a-z])/g,s)]=o)}c.fn.jquery&&"1."==c.fn.jquery.substr(0,2)&&e[0].dataset&&(n=c.extend(!0,{},e[0].dataset,n));var a,l=c.extend(!0,{},u.GetData(e[0]),n);for(a in l=u._convertData(l))-1<t.indexOf(a)||(c.isPlainObject(this.options[a])?c.extend(this.options[a],l[a]):this.options[a]=l[a]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),u.define("select2/core",["jquery","./options","./utils","./keys"],function(t,i,r,s){var o=function(e,t){null!=r.GetData(e[0],"select2")&&r.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new i(t,e),o.__super__.constructor.call(this);var n=e.attr("tabindex")||0;r.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");t=this.options.get("dataAdapter");this.dataAdapter=new t(e,this.options);n=this.render();this._placeContainer(n);t=this.options.get("selectionAdapter");this.selection=new t(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,n);t=this.options.get("dropdownAdapter");this.dropdown=new t(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,n);n=this.options.get("resultsAdapter");this.results=new n(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var s=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){s.trigger("selection:update",{data:e})}),e[0].classList.add("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),r.StoreData(e[0],"select2",this),e.data("select2",this)};return r.Extend(o,r.Observable),o.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+r.generateChars(2):r.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var s=this._resolveWidth(e,"style");return null!=s?s:this._resolveWidth(e,"element")}if("element"==t){s=e.outerWidth(!1);return s<=0?"auto":s+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;e=e.attr("style");if("string"!=typeof e)return null;for(var i=e.split(";"),r=0,o=i.length;r<o;r+=1){var a=i[r].replace(/\s/g,"").match(n);if(null!==a&&1<=a.length)return a[1]}return null},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=r.bind(this._syncAttributes,this),this._syncS=r.bind(this._syncSubtree,this),this._observer=new window.MutationObserver(function(e){t._syncA(),t._syncS(e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},o.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerSelectionEvents=function(){var n=this,s=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===s.indexOf(e)&&n.trigger(e,t)})},o.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container[0].classList.add("select2-container--open")}),this.on("close",function(){n.$container[0].classList.remove("select2-container--open")}),this.on("enable",function(){n.$container[0].classList.remove("select2-container--disabled")}),this.on("disable",function(){n.$container[0].classList.add("select2-container--disabled")}),this.on("blur",function(){n.$container[0].classList.remove("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===s.ESC||t===s.UP&&e.altKey?(n.close(e),e.preventDefault()):t===s.ENTER||t===s.TAB?(n.trigger("results:select",{}),e.preventDefault()):t===s.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===s.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===s.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===s.ENTER||t===s.SPACE||t===s.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._isChangeMutation=function(e){var t=this;if(e.addedNodes&&0<e.addedNodes.length){for(var n=0;n<e.addedNodes.length;n++)if(e.addedNodes[n].selected)return!0}else{if(e.removedNodes&&0<e.removedNodes.length)return!0;if(Array.isArray(e))return e.some(function(e){return t._isChangeMutation(e)})}return!1},o.prototype._syncSubtree=function(e){var e=this._isChangeMutation(e),t=this;e&&this.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,s={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in s){var i=s[e],s={prevented:!1,name:e,args:t};if(n.call(this,i,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},o.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},o.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);e=!e[0];this.$element.prop("disabled",e)},o.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},o.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();e=e[0];Array.isArray(e)&&(e=e.map(function(e){return e.toString()})),this.$element.val(e).trigger("input").trigger("change")},o.prototype.destroy=function(){r.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",r.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),r.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),r.StoreData(e[0],"element",this.$element),e},o}),u.define("jquery-mousewheel",["jquery"],function(e){return e}),u.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,r,t,o){var a;return null==i.fn.select2&&(a=["open","close","destroy"],i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new r(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,s)}),-1<a.indexOf(t)?this:n}),null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),r}),{define:u.define,require:u.require});function b(e,t){return i.call(e,t)}function l(e,t){var n,s,i,r,o,a,l,c,u,d,p=t&&t.split("/"),h=y.map,f=h&&h["*"]||{};if(e){for(t=(e=e.split("/")).length-1,y.nodeIdCompat&&_.test(e[t])&&(e[t]=e[t].replace(_,"")),"."===e[0].charAt(0)&&p&&(e=p.slice(0,p.length-1).concat(e)),c=0;c<e.length;c++)"."===(d=e[c])?(e.splice(c,1),--c):".."===d&&(0===c||1===c&&".."===e[2]||".."===e[c-1]||0<c&&(e.splice(c-1,2),c-=2));e=e.join("/")}if((p||f)&&h){for(c=(n=e.split("/")).length;0<c;--c){if(s=n.slice(0,c).join("/"),p)for(u=p.length;0<u;--u)if(i=h[p.slice(0,u).join("/")],i=i&&i[s]){r=i,o=c;break}if(r)break;!a&&f&&f[s]&&(a=f[s],l=c)}!r&&a&&(r=a,o=l),r&&(n.splice(0,o,r),e=n.join("/"))}return e}function w(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),o.apply(p,e.concat([t,n]))}}function x(e){var t;if(b(m,e)&&(t=m[e],delete m[e],v[e]=!0,r.apply(p,t)),!b(g,e)&&!b(v,e))throw new Error("No "+e);return g[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function A(e){return e?c(e):[]}var u=s.require("jquery.select2");return t.fn.select2.amd=s,u});
changelog.txt CHANGED
@@ -1,3 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  = 4.7.3 - 1.11.2022 =
2
  Fixed: Reports not working when cache is set ( [#1113](https://github.com/WPChill/download-monitor/issues/1113) )
3
  Fixed: Security update regarding directory traversal ( [#1111](https://github.com/WPChill/download-monitor/issues/1111) )
1
+ = 4.7.4 - 21.12.2022 =
2
+ Fix: Sorting by download count did not take into consideration the post meta ( [#1126](https://github.com/WPChill/download-monitor/issues/1126) )
3
+ Fix: Reports Downloads CPT retrieval ( [#1128](https://github.com/WPChill/download-monitor/issues/1128) )
4
+ Fix: Storing IP setting not working ( [#1124](https://github.com/WPChill/download-monitor/issues/1124) )
5
+ Fix: Visual indicator for buttons and non-content headers ( [#1119](https://github.com/WPChill/download-monitor/issues/1119) )
6
+ Changed: Reports display dates are now based on the Date Format and Time Format settings ( [#516](https://github.com/WPChill/download-monitor/issues/516) )
7
+ Added: Option to set category in the Downloads list widget ( [#659](https://github.com/WPChill/download-monitor/issues/659) )
8
+ Fixed: Exclude multiple tags in [downloads] shortcode ( [#660](https://github.com/WPChill/download-monitor/issues/660) )
9
+ Change: Set cookies "secure" flag based on server configuration ( [#687](https://github.com/WPChill/download-monitor/issues/687) )
10
+ Fixed: Bedrock installations redirect to file bug ( [#973](https://github.com/WPChill/download-monitor/issues/973) )
11
+ Fixed: Conflict between WPML and Download CPT REST APIs ( [#1118](https://github.com/WPChill/download-monitor/issues/1118) )
12
+ Fixed: Incompatiblity with WPML when languages added as parameter ( [#1112](https://github.com/WPChill/download-monitor/issues/1122) )
13
+ Fixed: Safari compatibility for filenames ( [#1125](https://github.com/WPChill/download-monitor/issues/1125) )
14
+ Changed: Upsell system for plugins page ( [#875](https://github.com/WPChill/download-monitor/issues/875) )
15
+ Added: Option to display the "No access" message in a popup( modal ) ( [#686](https://github.com/WPChill/download-monitor/issues/686) )
16
+ Fixed: Redirect to file when from uploads / uploadsis a symlink ( [#1100](https://github.com/WPChill/download-monitor/issues/1100) )
17
+
18
  = 4.7.3 - 1.11.2022 =
19
  Fixed: Reports not working when cache is set ( [#1113](https://github.com/WPChill/download-monitor/issues/1113) )
20
  Fixed: Security update regarding directory traversal ( [#1111](https://github.com/WPChill/download-monitor/issues/1111) )
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.7.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.7.3' );
38
  define( 'DLM_UPGRADER_VERSION', '4.6.0' );
39
 
40
  // Define DLM FILE
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.7.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.7.4' );
38
  define( 'DLM_UPGRADER_VERSION', '4.6.0' );
39
 
40
  // Define DLM FILE
includes/admin/class-dlm-upsells.php CHANGED
@@ -862,7 +862,7 @@ class DLM_Upsells {
862
  /**
863
  * Add the Upgrade to PRO plugin action link
864
  *
865
- * @param $links
866
  *
867
  * @return array
868
  *
@@ -870,17 +870,23 @@ class DLM_Upsells {
870
  */
871
  public function filter_action_links( $links ) {
872
 
873
- $dlm_extensions = DLM_Admin_Extensions::get_instance();
874
- $extensions = $dlm_extensions->get_available_extensions();
 
 
 
 
 
 
 
 
 
875
 
876
- if ( count( $extensions ) > 0 ) {
877
- $upgrade = array( '<a target="_blank" style="color: orange;font-weight: bold;" href="https://www.download-monitor.com/pricing/?utm_source=download-monitor&utm_medium=plugins-page&utm_campaign=upsell">' . esc_html__( 'Upgrade to PRO!', 'download-monitor' ) . '</a>' );
878
  return array_merge( $upgrade, $links );
879
  }
880
 
881
  return $links;
882
-
883
  }
884
  }
885
 
886
- DLM_Upsells::get_instance();
862
  /**
863
  * Add the Upgrade to PRO plugin action link
864
  *
865
+ * @param array $links Plugin action links.
866
  *
867
  * @return array
868
  *
870
  */
871
  public function filter_action_links( $links ) {
872
 
873
+ $dlm_extensions = DLM_Admin_Extensions::get_instance();
874
+ $extensions = $dlm_extensions->get_available_extensions();
875
+ $licensed_extensions = $dlm_extensions->get_licensed_extensions();
876
+ $installed_extensions = $dlm_extensions->get_installed_extensions();
877
+
878
+ if ( 0 < count( $extensions ) ) {
879
+ if ( 0 !== count( $licensed_extensions ) && 0 < count( $installed_extensions ) ) { // If there are any licensed extensions ( active ) we show the Upgrade button, not the upgrade to PRO button.
880
+ $upgrade = array( '<a target="_blank" style="color: orange;font-weight: bold;" href="https://www.download-monitor.com/pricing/?utm_source=download-monitor&utm_medium=plugins-page&utm_campaign=upsell">' . esc_html__( 'Upgrade!', 'download-monitor' ) . '</a>' );
881
+ } else { // Show the upgrade to PRO button if no extensions are licensed.
882
+ $upgrade = array( '<a target="_blank" style="color: orange;font-weight: bold;" href="https://www.download-monitor.com/pricing/?utm_source=download-monitor&utm_medium=plugins-page&utm_campaign=upsell">' . esc_html__( 'Upgrade to PRO!', 'download-monitor' ) . '</a>' );
883
+ }
884
 
 
 
885
  return array_merge( $upgrade, $links );
886
  }
887
 
888
  return $links;
 
889
  }
890
  }
891
 
892
+ DLM_Upsells::get_instance();
includes/admin/class-dlm-welcome.php CHANGED
@@ -25,6 +25,8 @@ class DLM_Welcome_Page {
25
  add_filter( 'dlm_admin_menu_links', array( $this, 'dlm_about_menu' ) );
26
  add_filter( 'submenu_file', array( $this, 'remove_about_submenu_item' ) );
27
  add_action( 'dlm_after_install_setup', array( $this, 'dlm_on_activation' ), 15 );
 
 
28
  }
29
 
30
 
@@ -123,68 +125,239 @@ class DLM_Welcome_Page {
123
  }
124
 
125
  $welcome = WPChill_Welcome::get_instance();
126
- ?>
127
- <div id="wpchill-welcome">
128
-
129
- <div class="container">
130
-
131
- <div class="hero features">
 
 
 
 
 
 
 
 
132
 
133
- <div class="mascot">
134
- <img src="<?php echo esc_attr( DLM_URL . 'assets/images/logo.png' ); ?>" alt="<?php esc_attr_e( 'Download Monitor Logo', 'download-monitor' ); ?>">
 
 
 
 
 
 
 
135
  </div>
136
-
137
- <div class="block">
138
- <?php $welcome->display_heading( esc_html__( 'Thank you for installing Download Monitor', 'download-monitor' ) ); ?>
139
- <?php $welcome->display_subheading( esc_html__( 'You\'re just a few steps away from adding, displaying and tracking your first download on your website with the easiest to use WordPress download plugin.', 'download-monitor' ) ); ?>
 
140
  </div>
141
- <?php $welcome->horizontal_delimiter(); ?>
142
- <div class="block">
143
- <?php $welcome->display_heading( esc_html__( 'Features&Add-ons', 'download-monitor' ) ); ?>
144
- <?php $welcome->layout_start( 2, 'feature-list clear' ); ?>
145
- <?php $welcome->display_extension( esc_html__( 'Gated content', 'download-monitor' ), esc_html__( 'Use our Email Lock or Gravity/Ninja Forms extensions to lock downloads and gather leads. Alternatively, use Twitter Lock to require tweets in exchange for access to digital products.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/gated-content.png', true, '#7364ff' ); ?>
146
- <?php $welcome->display_extension( esc_html__( 'Enforce download limits', 'download-monitor' ), esc_html__( 'Create advanced access rules and IP restrictions to control who can access downloads, how many times can files be downloaded by each user or when do files expire.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/enforce-download-limits.png', true, '#7364ff' ); ?>
147
- <?php $welcome->display_extension( esc_html__( 'Host files externally', 'download-monitor' ), esc_html__( 'Easily link files from Amazon S3 and Google Drive to your website.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/link-downloads-from-cloud.png', true, '#7364ff' ); ?>
148
- <?php $welcome->display_extension( esc_html__( 'Track your content', 'download-monitor' ), esc_html__( 'Gain access to detailed reports to see how your downloads are behaving.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/track-your-content.png' ); ?>
149
- <?php $welcome->display_extension( esc_html__( 'Content grouping', 'download-monitor' ), esc_html__( 'Easily assign categories, tags or other meta to your downloads.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/content-grouping.png' ); ?>
150
- <?php $welcome->display_extension( esc_html__( 'Customisable endpoints', 'download-monitor' ), esc_html__( 'For showing appealing download links and engaging buttons.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/customisable-endpoints.png', true, '#7364ff' ); ?>
151
- <?php $welcome->display_extension( esc_html__( 'Spam protection', 'download-monitor' ), esc_html__( 'Our smart Captcha extension stops bots from finding, accessing and/or downloading your files without authorization', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/spam-protection.png', true, '#7364ff' ); ?>
152
- <?php $welcome->display_extension( esc_html__( 'Monetize your downloads', 'download-monitor' ), esc_html__( 'Ability to sell your downloads straight from your WordPress website.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/monetize-your-downloads.png' ); ?>
153
- <?php $welcome->display_extension( esc_html__( 'Instant notifications', 'download-monitor' ), esc_html__( 'Receive instant email notifications whenever someone downloads your content.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/instant-notifications.png', true, '#7364ff' ); ?>
154
- <?php $welcome->display_extension( esc_html__( 'Page Addon', 'download-monitor' ), esc_html__( 'Make use of a shortcode to turn a page into a fully featured download listing page.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/page-addon.png', true, '#7364ff' ); ?>
155
- <?php $welcome->display_extension( esc_html__( 'Downloading Page', 'download-monitor' ), esc_html__( 'Forces your downloads to be served from a separate page.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/downloading-page.png', true, '#7364ff' ); ?>
156
- <?php $welcome->display_extension( esc_html__( 'Easy data importing/exporting', 'download-monitor' ), esc_html__( ' Import/export all download data including categories, tags and all file versions to and from a CSV file.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/data-importing-exporting.png', true, '#7364ff' ); ?>
157
- <?php $welcome->layout_end(); ?>
158
-
 
 
 
 
 
 
 
 
 
 
 
159
  <div class="button-wrap-single clear">
160
- <div class="right">
161
- <?php $welcome->display_button( esc_html__( 'Upgrade Now', 'download-monitor' ), 'https://www.download-monitor.com/pricing/?utm_source=welcome_banner&utm_medium=upgradenow&utm_campaign=welcome_banner&utm_content=first_button', true, '#E76F51' ); ?>
162
- </div>
163
  </div>
164
  </div>
 
 
 
165
  <?php $welcome->horizontal_delimiter(); ?>
166
- <div class="block">
167
- <div class="testimonials">
168
- <div class="clear">
169
- <?php $welcome->display_heading( esc_html__( 'Happy users of Download Monitor', 'download-monitor' ) ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  <?php $welcome->display_testimonial( esc_html__( 'Do not spend any time considering other plugins that may offer the same bells and whistles. Not only is this full of fantastic functionality, the support behind the plugin is superior to anything you will get from any other developer.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/carlos-espinosa.jpeg', 'Carlos Espinosa' ); ?>
171
  <?php $welcome->display_testimonial( esc_html__( 'Download Monitor rocks! It lets me easily implement customized/themed lists of downloads and offers useful statistics and access logs for my downloads.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/Sebastian-Herrmann.jpeg', 'Sebastian Herrmann' ); ?>
172
- </div>
173
- </div><!-- testimonials -->
174
-
175
- <div class="button-wrap clear">
176
- <div class="left">
177
- <?php $welcome->display_button( esc_html__( 'Start Adding Downloads', 'download-monitor' ), esc_url( admin_url( 'edit.php?post_type=dlm_download' ) ), true, '#7364ff' ); ?>
178
- </div>
179
- <div class="right">
180
- <?php $welcome->display_button( esc_html__( 'Upgrade Now', 'download-monitor' ), 'https://www.download-monitor.com/pricing/?utm_source=welcome_banner&utm_medium=upgradenow&utm_campaign=welcome_banner&utm_content=second_button', true, '#E76F51' ); ?>
181
- </div>
182
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  </div>
184
- </div><!-- hero -->
185
- </div><!-- container -->
186
  </div><!-- wpchill welcome -->
187
  <?php
188
  }
189
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  }
25
  add_filter( 'dlm_admin_menu_links', array( $this, 'dlm_about_menu' ) );
26
  add_filter( 'submenu_file', array( $this, 'remove_about_submenu_item' ) );
27
  add_action( 'dlm_after_install_setup', array( $this, 'dlm_on_activation' ), 15 );
28
+ add_filter( 'dlm_page_header', array( $this, 'welcome_header' ), 15 );
29
+ add_action( 'admin_enqueue_scripts', array( $this, 'welcome_scripts' ) );
30
  }
31
 
32
 
125
  }
126
 
127
  $welcome = WPChill_Welcome::get_instance();
128
+ /** @var \DLM_Settings_Helper $settings */
129
+ $settings = download_monitor()->service( 'settings' );
130
+ /**
131
+ * Check if no access page is already set in settings
132
+ */
133
+ $page_no_access = $settings->get_option( 'no_access_page' );
134
+ /**
135
+ * Check if no access page is already set in settings
136
+ */
137
+ $page_cart = $settings->get_option( 'page_cart' );
138
+ /**
139
+ * Check if no access page is already set in settings
140
+ */
141
+ $page_checkout = $settings->get_option( 'page_checkout' );
142
 
143
+ ?>
144
+ <div id="wpchill-welcome">
145
+ <div class="hero">
146
+ <div class="block welcome-header">
147
+ <?php $welcome->layout_start( 2, 'feature-list clear' ); ?>
148
+ <div class="block-row">
149
+ <div class="dlm-logo">
150
+ <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTA1IiBoZWlnaHQ9IjEwNSIgdmlld0JveD0iMCAwIDEwNSAxMDUiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik01Mi41IDAuMDAwNTk5Njc0QzM4LjU3NTYgMC4wMDA1OTk2NzQgMjUuMjIxOSA1LjUzMjAzIDE1LjM3NzYgMTUuMzc4MUM1LjUzMTQ2IDI1LjIyMjkgMCAzOC41NzY2IDAgNTIuNTAwM0MwIDY2LjQyNCA1LjUzMTQ2IDc5Ljc3ODMgMTUuMzc3NiA4OS42MjI1QzI1LjIyMjUgOTkuNDY4NiAzOC41NzYyIDEwNSA1Mi41IDEwNUM2Ni40MjM4IDEwNSA3OS43NzgxIDk5LjQ2ODYgODkuNjIyNCA4OS42MjI1Qzk5LjQ2ODUgNzkuNzc3NyAxMDUgNjYuNDI0IDEwNSA1Mi41MDAzQzEwNSA0My4yODQ1IDEwMi41NzQgMzQuMjMwOCA5Ny45NjY0IDI2LjI1MDJDOTMuMzU4NyAxOC4yNjk1IDg2LjczMDQgMTEuNjQxNiA3OC43NDk3IDcuMDMzNTRDNzAuNzY5IDIuNDI1ODEgNjEuNzE1MiAwIDUyLjQ5OTQgMEw1Mi41IDAuMDAwNTk5Njc0Wk00MC40Nzc3IDM4LjI3MThMNDcuMjQ5OSA0NS4wOTY5VjI2LjI0OTZINTcuNzUwMVY0NS4wOTY5TDY0LjUyMjMgMzguMzI0Nkw3MS45MjUyIDQ1LjcyNzVMNTIuNSA2NS4xNTI2TDMzLjAyMiA0NS42NzQ3TDQwLjQ3NzcgMzguMjcxOFpNNzguNzQ5MSA3OC43NTExSDI2LjI0ODVWNjguMjUxSDc4Ljc0OTFWNzguNzUxMVoiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8zN184NSkiLz4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8zN184NSIgeDE9Ii0zNy41MjkzIiB5MT0iMS4wOTMzNGUtMDYiIHgyPSI5NS45NzY2IiB5Mj0iMTA3Ljg3MSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBvZmZzZXQ9IjAuMTEwMTEzIiBzdG9wLWNvbG9yPSIjNURERUZCIi8+CjxzdG9wIG9mZnNldD0iMC40NDM1NjgiIHN0b3AtY29sb3I9IiM0MTlCQ0EiLz4KPHN0b3Agb2Zmc2V0PSIwLjYzNjEyMiIgc3RvcC1jb2xvcj0iIzAwOENENSIvPgo8c3RvcCBvZmZzZXQ9IjAuODU1OTk3IiBzdG9wLWNvbG9yPSIjMDI1RUEwIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAyNTM4RCIvPgo8L2xpbmVhckdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo="
151
+ alt="<?php esc_attr_e( 'Download Monitor Logo', 'download-monitor' ); ?>">
152
  </div>
153
+ <?php $welcome->display_heading( esc_html__( 'Welcome to Download Monitor', 'download-monitor' ),' left' ); ?>
154
+ <?php $welcome->display_subheading( esc_html__( 'You\'re just a few steps away from adding, displaying and tracking your first download on your website with the easiest to use WordPress download plugin.', 'download-monitor' ), 'left' ); ?>
155
+ <div class="block padding-horizontal-15">
156
+ <?php $welcome->display_button( esc_html__( 'Create Your First Download', 'download-monitor' ), esc_url( admin_url( 'post-new.php?post_type=dlm_download' ) ), 'button-primary button-hero', false, '#2271b1' ); ?>&nbsp;&nbsp;&nbsp;&nbsp;
157
+ <?php $welcome->display_button( esc_html__( 'Read our getting started guide', 'download-monitor' ), 'https://www.download-monitor.com/kb/add-your-first-download/', 'button-secondary button-hero', false, 'transparent', '#fff', '#fff' ); ?>
158
  </div>
159
+ </div>
160
+ <div class="block-row">
161
+ <img src="<?php echo esc_url( DLM_URL ); ?>includes/submodules/banner/assets/img/welcome_header_laptop.png" alt="<?php esc_attr_e( 'Watch how to', 'strong-testimonials' ); ?>">
162
+ </div>
163
+ <?php $welcome->layout_end(); ?>
164
+ </div>
165
+ </div><!-- hero -->
166
+ <div class="features">
167
+ <div class="block">
168
+ <?php $welcome->display_empty_space(); ?>
169
+ <?php $welcome->display_heading( esc_html__( 'Features & Add-ons', 'download-monitor' ), 'left' ); ?>
170
+ <?php $welcome->horizontal_delimiter(); ?>
171
+ <?php $welcome->display_empty_space(); ?>
172
+ <?php $welcome->layout_start( 3, 'feature-list clear' ); ?>
173
+ <?php $welcome->display_extension( esc_html__( 'Gated content', 'download-monitor' ), esc_html__( 'Use our Email Lock or Gravity/Ninja Forms extensions to lock downloads and gather leads. Alternatively, use Twitter Lock to require tweets in exchange for access to digital products.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/gated-content.png', true, '#F08232' ); ?>
174
+ <?php $welcome->display_extension( esc_html__( 'Enforce download limits', 'download-monitor' ), esc_html__( 'Create advanced access rules and IP restrictions to control who can access downloads, how many times can files be downloaded by each user or when do files expire.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/enforce-download-limits.png', true, '#F08232' ); ?>
175
+ <?php $welcome->display_extension( esc_html__( 'Host files externally', 'download-monitor' ), esc_html__( 'Easily link files from Amazon S3 and Google Drive to your website.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/link-downloads-from-cloud.png', true, '#F08232' ); ?>
176
+ <?php $welcome->display_extension( esc_html__( 'Track your content', 'download-monitor' ), esc_html__( 'Gain access to detailed reports to see how your downloads are behaving.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/track-your-content.png' ); ?>
177
+ <?php $welcome->display_extension( esc_html__( 'Content grouping', 'download-monitor' ), esc_html__( 'Easily assign categories, tags or other meta to your downloads.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/content-grouping.png' ); ?>
178
+ <?php $welcome->display_extension( esc_html__( 'Customisable endpoints', 'download-monitor' ), esc_html__( 'For showing appealing download links and engaging buttons.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/customisable-endpoints.png', true, '#F08232' ); ?>
179
+ <?php $welcome->display_extension( esc_html__( 'Spam protection', 'download-monitor' ), esc_html__( 'Our smart Captcha extension stops bots from finding, accessing and/or downloading your files without authorization', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/spam-protection.png', true, '#F08232' ); ?>
180
+ <?php $welcome->display_extension( esc_html__( 'Monetize your downloads', 'download-monitor' ), esc_html__( 'Ability to sell your downloads straight from your WordPress website.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/monetize-your-downloads.png' ); ?>
181
+ <?php $welcome->display_extension( esc_html__( 'Instant notifications', 'download-monitor' ), esc_html__( 'Receive instant email notifications whenever someone downloads your content.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/instant-notifications.png', true, '#F08232' ); ?>
182
+ <?php $welcome->display_extension( esc_html__( 'Page Addon', 'download-monitor' ), esc_html__( 'Make use of a shortcode to turn a page into a fully featured download listing page.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/page-addon.png', true, '#F08232' ); ?>
183
+ <?php $welcome->display_extension( esc_html__( 'Downloading Page', 'download-monitor' ), esc_html__( 'Forces your downloads to be served from a separate page.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/downloading-page.png', true, '#F08232' ); ?>
184
+ <?php $welcome->display_extension( esc_html__( 'Easy data importing/exporting', 'download-monitor' ), esc_html__( ' Import/export all download data including categories, tags and all file versions to and from a CSV file.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/features/data-importing-exporting.png', true, '#F08232' ); ?>
185
+ <?php $welcome->layout_end(); ?>
186
+ <?php $welcome->display_empty_space(); ?>
187
+ <div class="wpchill-text-center">
188
  <div class="button-wrap-single clear">
189
+ <div >
190
+ <?php $welcome->display_button( esc_html__( 'Upgrade Now', 'download-monitor' ), 'https://www.download-monitor.com/pricing/?utm_source=welcome_banner&utm_medium=upgradenow&utm_campaign=welcome_banner&utm_content=first_button', 'button-primary button-hero', false, '#E76F51' ); ?>
191
+ </div>
192
  </div>
193
  </div>
194
+ </div>
195
+ <div class="block text-left pages-creation">
196
+ <?php $welcome->display_heading( esc_html__( 'Getting started checklist', 'download-monitor' ), 'left' ); ?>
197
  <?php $welcome->horizontal_delimiter(); ?>
198
+ <?php $welcome->display_empty_space(); ?>
199
+ <?php $welcome->display_subheading( esc_html__( 'In order to function properly, Download Monitor needs to create some pages in your WordPress website.', 'download-monitor' ), 'left' ); ?>
200
+ <?php $welcome->display_subheading( esc_html__( 'We can create these pages for you here. If you click the \'Create Page\' button we will create that page and add the required shortcode to it. We\'ll also make sure the newly created page is set in your settings page.', 'download-monitor' ), 'left' ); ?>
201
+ <?php $welcome->display_empty_space(); ?>
202
+ <?php $welcome->layout_start( '2', 'white-bg padding-vertical-15' ); ?>
203
+ <div class="block text-left">
204
+ <p style="margin:0 auto;margin-top:5px;"><strong>
205
+ <span class="dashicons <?php echo 0 != $page_no_access ? ' dashicons-yes': ' dashicons-no'; ?>" style="<?php echo 0 != $page_no_access ? 'color:#23A870;opacity:1;': 'color:gray;opacity:0.5;'; ?>"></span><?php echo esc_html__( 'No Access', 'download-monitor' ); ?></strong></p>
206
+ <p class="description"><?php echo esc_html__( 'The page your visitors see when they are not allowed to download a file.', 'download-monitor' ); ?></p>
207
+ </div>
208
+ <div class="block text-right padding-15">
209
+ <?php
210
+
211
+ if ( $page_no_access != 0 ) :
212
+ ?>
213
+ <a href="javascript:;"
214
+ class="button button-primary button-hero dlm-page-exists"><?php echo esc_html__( 'Page Created', 'download-monitor' ); ?></a>
215
+ <?php
216
+ else:
217
+ ?>
218
+ <a href="javascript:;"
219
+ class="button button-primary button-hero dlm-create-page"
220
+ data-page="no-access"><?php echo esc_html__( 'Create Page', 'download-monitor' ); ?></a>
221
+ <?php
222
+ endif;
223
+ ?>
224
+ </div>
225
+ <?php $welcome->layout_end(); ?>
226
+ <?php $welcome->layout_start( '2', 'white-bg padding-vertical-15' ); ?>
227
+ <div class="block text-left">
228
+ <p style="margin:0 auto;margin-top:5px;"><strong><span class="dashicons <?php echo 0 != $page_cart ? ' dashicons-yes': ' dashicons-no'; ?>" style="<?php echo 0 != $page_cart ? 'color:#23A870;opacity:1;': 'color:gray;opacity:0.5;'; ?>"></span><?php echo esc_html__( 'Cart', 'download-monitor' ); ?></strong></p>
229
+ <p class="description"><?php echo esc_html__( 'Your shop cart page if you decide to sell downloads.', 'download-monitor' ); ?></p>
230
+ </div>
231
+ <div class="block text-right padding-15">
232
+ <?php
233
+ if ( $page_cart != 0 ) :
234
+ ?>
235
+ <a href="javascript:;"
236
+ class="button button-primary button-hero dlm-page-exists"><?php echo esc_html__( 'Page Created', 'download-monitor' ); ?></a>
237
+ <?php
238
+ else:
239
+ ?>
240
+ <a href="javascript:;"
241
+ class="button button-primary button-hero dlm-create-page"
242
+ data-page="cart"><?php echo esc_html__( 'Create Page', 'download-monitor' ); ?></a>
243
+ <?php
244
+ endif;
245
+ ?>
246
+ </div>
247
+ <?php $welcome->layout_end(); ?>
248
+ <?php $welcome->layout_start( '2', 'white-bg padding-vertical-15' ); ?>
249
+ <div class="block text-left">
250
+ <p style="margin:0 auto;margin-top:5px;"><strong><span class="dashicons <?php echo 0 != $page_checkout ? ' dashicons-yes': ' dashicons-no'; ?>" style="<?php echo 0 != $page_checkout ? 'color:#23A870;opacity:1;': 'color:gray;opacity:0.5;'; ?>"></span><?php echo esc_html__( 'Checkout', 'download-monitor' ); ?></strong></p>
251
+ <p class="description"><?php echo esc_html__( 'Your shop checkout page if you decide to sell downloads.', 'download-monitor' ); ?></p>
252
+ </div>
253
+ <div class="block text-right padding-15">
254
+ <?php
255
+
256
+ if ( 0 !== $page_checkout ) :
257
+ ?>
258
+ <a href="javascript:;"
259
+ class="button button-primary button-hero dlm-page-exists"><?php echo esc_html__( 'Page Created', 'download-monitor' ); ?></a>
260
+ <?php
261
+ else:
262
+ ?>
263
+ <a href="javascript:;"
264
+ class="button button-primary button-hero dlm-create-page"
265
+ data-page="checkout"><?php echo esc_html__( 'Create Page', 'download-monitor' ); ?></a>
266
+ <?php
267
+ endif;
268
+ ?>
269
+ </div>
270
+ <?php $welcome->layout_end(); ?>
271
+ <?php $welcome->display_empty_space(); ?>
272
+ <?php $welcome->layout_start( '4', 'pages-creation__buttons' ); ?>
273
+ <div class="block"></div>
274
+ <div class="block text-right">
275
+ <?php $welcome->display_button( esc_html__( 'Create Your First Download', 'download-monitor' ), esc_url( admin_url( 'post-new.php?post_type=dlm_download' ) ), 'button-primary', false, '#2271b1' ); ?>
276
+ </div>
277
+ <div class="block guide-button">
278
+ <?php $welcome->display_button( esc_html__( 'Read our getting started guide', 'download-monitor' ), 'https://www.download-monitor.com/kb/add-your-first-download/', 'button-secondary', false, 'transparent', '#2271b1', '#2271b1' ); ?>
279
+ </div>
280
+ <div class="block"></div>
281
+ <?php $welcome->layout_end(); ?>
282
+ </div>
283
+ <?php $welcome->display_empty_space(); ?>
284
+ <?php $welcome->display_empty_space(); ?>
285
+ <div class="block">
286
+ <?php $welcome->display_heading( esc_html__( 'Happy users of Download Monitor', 'download-monitor' ), 'left' ); ?>
287
+ <?php $welcome->horizontal_delimiter(); ?>
288
+ <div class="testimonials">
289
+ <div class="block-row">
290
  <?php $welcome->display_testimonial( esc_html__( 'Do not spend any time considering other plugins that may offer the same bells and whistles. Not only is this full of fantastic functionality, the support behind the plugin is superior to anything you will get from any other developer.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/carlos-espinosa.jpeg', 'Carlos Espinosa' ); ?>
291
  <?php $welcome->display_testimonial( esc_html__( 'Download Monitor rocks! It lets me easily implement customized/themed lists of downloads and offers useful statistics and access logs for my downloads.', 'download-monitor' ), esc_url( DLM_URL ) . 'assets/images/Sebastian-Herrmann.jpeg', 'Sebastian Herrmann' ); ?>
 
 
 
 
 
 
 
 
 
 
292
  </div>
293
+ </div><!-- testimonials -->
294
+ <?php $welcome->display_empty_space(); ?>
295
+ <?php $welcome->display_empty_space(); ?>
296
+ <div class="pages-creation">
297
+ <?php $welcome->layout_start( '4', 'pages-creation__buttons' ); ?>
298
+ <div class="block"></div>
299
+ <div class="block text-right">
300
+ <?php $welcome->display_button( esc_html__( 'Create Your First Download', 'download-monitor' ), esc_url( admin_url( 'edit.php?post_type=dlm_download' ) ), 'button-primary', false, '#2271b1' ); ?>
301
+ </div>
302
+ <div class="block">
303
+ <?php $welcome->display_button( esc_html__( 'Upgrade Now', 'download-monitor' ), 'https://www.download-monitor.com/pricing/?utm_source=welcome_banner&utm_medium=upgradenow&utm_campaign=welcome_banner&utm_content=second_button', 'button-secondary', false, '#E76F51' ); ?>
304
+ </div>
305
+ <div class="block"></div>
306
+ <?php $welcome->layout_end(); ?>
307
  </div>
308
+ </div>
309
+ </div><!-- features -->
310
  </div><!-- wpchill welcome -->
311
  <?php
312
  }
313
 
314
+ /**
315
+ * Don't display the header on the Welcome banner
316
+ *
317
+ * @param bool $return Return value.
318
+ *
319
+ * @return bool|false
320
+ * @since 4.7.4
321
+ */
322
+ public function welcome_header( $return ) {
323
+
324
+ if ( function_exists( 'get_current_screen' ) ) {
325
+ $current_screen = get_current_screen();
326
+
327
+ if ( 'dlm_download' === $current_screen->post_type && 'dlm_download_page_download-monitor-about-page' === $current_screen->base ) {
328
+ $return = false;
329
+ }
330
+ }
331
+
332
+ return $return;
333
+ }
334
+
335
+ /**
336
+ * Enqueue welcome page scripts
337
+ *
338
+ * @return void
339
+ * @since 4.7.4
340
+ */
341
+ public function welcome_scripts() {
342
+ if ( function_exists( 'get_current_screen' ) ) {
343
+
344
+ $current_screen = get_current_screen();
345
+ if ( 'dlm_download' === $current_screen->post_type && 'dlm_download_page_download-monitor-about-page' === $current_screen->base ) {
346
+ wp_enqueue_script(
347
+ 'dlm_onboarding',
348
+ plugins_url( '/assets/js/onboarding' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', download_monitor()->get_plugin_file() ),
349
+ array( 'jquery' ),
350
+ DLM_VERSION
351
+ );
352
+
353
+ wp_localize_script( 'dlm_onboarding', 'dlm_onboarding', array(
354
+ 'ajax_url_create_page' => \DLM_Ajax_Manager::get_ajax_url( 'create_page' ),
355
+ 'lbl_creating' => __( 'Creating', 'download-monitor' ) . '...',
356
+ 'lbl_created' => __( 'Page Created', 'download-monitor' ),
357
+ 'lbl_create_page' => __( 'Create Page', 'download-monitor' ),
358
+ ) );
359
+ }
360
+ }
361
+ }
362
+
363
  }
includes/backwards-compatibility/class-dlm-backwards-compatibility.php CHANGED
@@ -179,10 +179,9 @@ class DLM_Backwards_Compatibility {
179
  public function join_download_count_compatibility( $join ) {
180
  global $wpdb;
181
 
182
- $join .= " LEFT JOIN {$wpdb->dlm_downloads} ON ({$wpdb->posts}.ID = {$wpdb->dlm_downloads}.download_id) ";
183
 
184
  return $join;
185
-
186
  }
187
 
188
  /**
@@ -213,7 +212,7 @@ class DLM_Backwards_Compatibility {
213
 
214
  global $wpdb;
215
 
216
- $fields .= ", {$wpdb->dlm_downloads}.download_count as counts ";
217
 
218
  return $fields;
219
  }
@@ -251,7 +250,7 @@ class DLM_Backwards_Compatibility {
251
  $order = $this->filters['order'];
252
  }
253
 
254
- return ' counts ' . $order;
255
 
256
  }
257
 
179
  public function join_download_count_compatibility( $join ) {
180
  global $wpdb;
181
 
182
+ $join .= " LEFT JOIN {$wpdb->dlm_downloads} ON ({$wpdb->posts}.ID = {$wpdb->dlm_downloads}.download_id) LEFT JOIN ( SELECT {$wpdb->postmeta}.meta_value, {$wpdb->postmeta}.post_id FROM {$wpdb->postmeta} WHERE {$wpdb->postmeta}.meta_key = '_download_count') as meta_downloads ON ( meta_downloads.post_id = {$wpdb->posts}.ID )";
183
 
184
  return $join;
 
185
  }
186
 
187
  /**
212
 
213
  global $wpdb;
214
 
215
+ $fields .= ", {$wpdb->dlm_downloads}.download_count, ( IFNULL( {$wpdb->dlm_downloads}.download_count, 0 ) + IFNULL( meta_downloads.meta_value, 0 ) ) total_downloads";
216
 
217
  return $fields;
218
  }
250
  $order = $this->filters['order'];
251
  }
252
 
253
+ return ' total_downloads ' . $order;
254
 
255
  }
256
 
includes/submodules/banner/assets/css/wpchill-welcome.css CHANGED
@@ -1,86 +1,101 @@
1
  #wpchill-welcome {
2
- padding-top: 80px;
 
 
3
  }
4
 
5
  #wpchill-welcome *, #wpchill-welcome *::before, #wpchill-welcome *::after {
6
- -webkit-box-sizing: border-box;
7
- -moz-box-sizing: border-box;
8
- box-sizing: border-box;
9
  }
10
 
11
  #wpchill-welcome .clear:before {
12
- content: " ";
13
- display: table;
14
  }
15
 
16
  #wpchill-welcome .clear:after {
17
- clear: both;
18
- content: " ";
19
- display: table;
20
  }
21
 
22
  #wpchill-welcome .container {
23
- margin: 0 auto;
24
- max-width: 800px;
25
- padding: 0;
26
  }
27
 
28
  #wpchill-welcome .block {
29
- padding: 40px;
 
 
 
 
 
30
  }
31
 
32
  #wpchill-welcome img {
33
- max-width: 100%;
34
- height: auto;
35
  }
36
 
37
  #wpchill-welcome h1 {
38
- color: #222;
39
- font-size: 24px;
40
- margin: 0 0 16px 0;
41
  }
42
 
43
  #wpchill-welcome h5 {
44
- color: #222;
45
- font-size: 16px;
46
- margin: 0 0 8px 0;
47
  }
48
 
49
  #wpchill-welcome h6 {
50
- font-size: 16px;
51
- font-weight: 400;
52
- line-height: 1.6;
53
- margin: 0;
54
  }
55
 
56
  #wpchill-welcome .wpmtst-btn-lg {
57
- font-size: 16px;
58
- font-weight: 600;
59
- padding: 16px 28px;
60
  }
61
 
62
  #wpchill-welcome .wpmtst-btn-block {
63
- display: block;
64
- width: 100%;
65
  }
66
 
67
  #wpchill-welcome .wpmtst-btn {
68
- border: 0;
69
- border-radius: 40px;
70
- cursor: pointer;
71
- display: inline-block;
72
- margin: 0;
73
- text-decoration: none;
74
- text-align: center;
75
- vertical-align: middle;
76
- white-space: nowrap;
77
- box-shadow: none;
78
  }
79
 
 
 
 
 
 
 
 
 
80
 
81
  #wpchill-welcome .button-wrap {
82
- max-width: 590px;
83
- margin: 0 auto 0 auto;
84
  }
85
 
86
  #wpchill-welcome .button-wrap .left {
@@ -88,7 +103,7 @@
88
  }
89
 
90
  #wpchill-welcome .button-wrap-single a {
91
- font-size: 14px;
92
  }
93
 
94
  #wpchill-welcome .button-wrap-single {
@@ -117,59 +132,134 @@
117
 
118
  /* hero section */
119
  #wpchill-welcome .hero {
120
- background-color: #fff;
121
- border-radius: 10px;
122
- margin-bottom: 30px;
123
  position: relative;
124
  box-shadow: -3px 2px 70px 0px rgba(128, 144, 174, 0.1);
125
- padding-top: 40px;
 
 
 
 
 
 
 
126
  }
127
 
128
  #wpchill-welcome .hero .mascot {
129
- background-color: #fff;
130
- border-radius: 50%;
131
- height: 90px;
132
- width: 90px;
133
  padding: 28px 28px;
134
- position: absolute;
135
- top: -45px;
136
- left: 50%;
137
- margin-left: -45px;
 
 
 
 
 
 
 
 
 
 
 
 
138
  }
139
 
140
  #wpchill-welcome .hero .video-thumbnail {
141
- display: block;
142
  margin: 0;
143
  width: 100%;
144
  }
145
 
146
  #wpchill-welcome .hero .button-wrap {
147
- margin-top: 20px;
148
  }
149
 
150
 
151
  /* features section */
152
  #wpchill-welcome .features {
153
- background-color: #fff;
154
  border-top-left-radius: 10px;
155
  border-top-right-radius: 10px;
156
  position: relative;
157
- padding-top: 20px;
 
 
 
 
 
 
 
158
  }
159
 
160
  #wpchill-welcome .features .feature-list {
161
- margin-top: 40px;
 
 
 
 
 
 
 
 
 
 
162
  }
163
 
164
  #wpchill-welcome .features .feature-block {
165
  margin-bottom: 30px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  }
167
 
168
  @media screen and (min-width: 720px) {
169
 
170
  #wpchill-welcome .block-row-2 .feature-block {
171
  margin: 0 auto;
172
- float: left;
173
  width: 50%;
174
  padding-bottom: 32px;
175
  overflow: auto;
@@ -177,7 +267,7 @@
177
 
178
  #wpchill-welcome .block-row-3 .feature-block {
179
  margin: 0 auto;
180
- float: left;
181
  width: 33%;
182
  padding-bottom: 32px;
183
  overflow: auto;
@@ -199,13 +289,15 @@
199
  #wpchill-welcome .features .feature-block.last {
200
  padding-left: 22px;
201
  }
 
202
  .block-row-1 > * {
203
  width: 100%;
204
  }
205
- .block-row{
206
- display:flex;
207
- flex-wrap:wrap;
208
- align-items:flex-start;
 
209
  flex-direction: row;
210
  justify-content: flex-start;
211
  }
@@ -223,29 +315,27 @@
223
  }
224
  }
225
 
226
- #wpchill-welcome .features .feature-block img {
227
- float: left;
228
  max-width: 44px;
229
  max-height: 44px;
230
  }
231
 
232
  #wpchill-welcome .features .feature-block h5 {
233
- margin-left: 70px;
234
- }
235
-
236
- #wpchill-welcome .features .feature-block p {
237
- margin-left: 70px;
238
  }
239
 
240
  #wpchill-welcome .features .pro-label {
241
- display: inline-block;
242
- line-height: 1;
243
- color: #fff;
244
- padding: 3px 6px;
245
- font-size: 0.75rem;
246
- border-radius: 20px;
247
- vertical-align: text-top;
248
- margin-left: 20px;
 
 
 
249
  }
250
 
251
  #wpchill-welcome .features .feature-list a {
@@ -258,22 +348,22 @@
258
  text-align: center;
259
  }
260
 
261
- #wpchill-welcome .upgrade h1{
262
  color: #fff;
263
  }
264
 
265
  @media screen and (min-width: 720px) {
266
 
267
- #wpchill-welcome .upgrade .left{
268
- float: left;
269
  width: 50%;
270
  padding-left: 20%;
271
  margin-bottom: 30px;
272
  text-align: left;
273
  }
274
 
275
- #wpchill-welcome .upgrade .right{
276
- float: left;
277
  width: 50%;
278
  padding-right: 20%;
279
  margin-bottom: 30px;
@@ -289,25 +379,33 @@
289
 
290
  /* testimonials section */
291
  #wpchill-welcome .testimonials {
292
- background-color: #fafafa;
293
-
294
  position: relative;
295
- box-shadow: -3px 2px 70px 0px rgba(128, 144, 174, 0.1);
 
 
 
296
  }
297
 
298
  #wpchill-welcome .testimonials .testimonial-block {
299
- padding: 0 16px 32px;
300
  overflow: auto;
301
  margin-top: 40px;
302
  text-align: center;
 
 
 
 
 
 
303
  }
304
 
305
  @media screen and (min-width: 720px) {
306
 
307
  #wpchill-welcome .testimonials .testimonial-block {
308
- float: left;
309
- width: 50%;
310
- }
311
 
312
  }
313
 
@@ -322,7 +420,7 @@
322
  max-height: 60px;
323
  border-radius: 50%;
324
  filter: grayscale(100%);
325
- box-shadow: 0 0 12px rgba(0,0,0,0.15);
326
  }
327
 
328
  /* testimonials footer */
@@ -330,42 +428,84 @@
330
  background-color: #fff;
331
  border-bottom-left-radius: 10px;
332
  border-bottom-right-radius: 10px;
333
- margin-bottom: 30px;
334
  position: relative;
335
  box-shadow: -3px 2px 70px 0px rgba(128, 144, 174, 0.1);
336
  }
337
 
338
  #wpchill-welcome .container {
339
- position: relative;
340
- width: 100%;
341
- height: 0;
342
- padding-bottom: 56.25%;
343
  }
344
 
345
  #wpchill-welcome .video {
346
- position: absolute;
347
- top: 0;
348
- left: 0;
349
- width: 100%;
350
- height: 100%;
351
  }
352
 
353
  #wpchill-welcome .stars_wrapper svg {
354
- height: 20px;
355
  }
356
 
357
- #wpchill-welcome .wpchill_empty_space{
358
- display:block;
359
- clear:both;
360
  }
361
 
362
  .wpchill_horizontal_delimiter {
363
  background-color: #f0f0f1;
364
- height:20px;
365
- width:100%;
366
- margin:0 auto;
 
 
 
 
367
  }
368
 
369
  .wpchill-text-center {
370
  text-align: center;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
371
  }
1
  #wpchill-welcome {
2
+ width: calc(100% + 20px);
3
+ padding-top: 0;
4
+ margin-left: -20px;
5
  }
6
 
7
  #wpchill-welcome *, #wpchill-welcome *::before, #wpchill-welcome *::after {
8
+ -webkit-box-sizing: border-box;
9
+ -moz-box-sizing: border-box;
10
+ box-sizing: border-box;
11
  }
12
 
13
  #wpchill-welcome .clear:before {
14
+ content: " ";
15
+ display: table;
16
  }
17
 
18
  #wpchill-welcome .clear:after {
19
+ clear: both;
20
+ content: " ";
21
+ display: table;
22
  }
23
 
24
  #wpchill-welcome .container {
25
+ margin: 0 auto;
26
+ max-width: 800px;
27
+ padding: 0;
28
  }
29
 
30
  #wpchill-welcome .block {
31
+ padding: 0 40px;
32
+ }
33
+
34
+ #wpchill-welcome .feature-list .block {
35
+ padding-left: 0;
36
+ padding-top: 20px;
37
  }
38
 
39
  #wpchill-welcome img {
40
+ max-width: 100%;
41
+ height: auto;
42
  }
43
 
44
  #wpchill-welcome h1 {
45
+ color: #222;
46
+ font-size: 24px;
47
+ margin: 0 0 16px 0;
48
  }
49
 
50
  #wpchill-welcome h5 {
51
+ color: #222;
52
+ font-size: 16px;
53
+ margin: 0 0 8px 0;
54
  }
55
 
56
  #wpchill-welcome h6 {
57
+ font-size: 16px;
58
+ font-weight: 400;
59
+ line-height: 1.6;
60
+ margin: 0;
61
  }
62
 
63
  #wpchill-welcome .wpmtst-btn-lg {
64
+ font-size: 16px;
65
+ font-weight: 600;
66
+ padding: 16px 28px;
67
  }
68
 
69
  #wpchill-welcome .wpmtst-btn-block {
70
+ display: block;
71
+ width: 100%;
72
  }
73
 
74
  #wpchill-welcome .wpmtst-btn {
75
+ border: 0;
76
+ border-radius: 40px;
77
+ cursor: pointer;
78
+ display: inline-block;
79
+ margin: 0;
80
+ text-decoration: none;
81
+ text-align: center;
82
+ vertical-align: middle;
83
+ white-space: nowrap;
84
+ box-shadow: none;
85
  }
86
 
87
+ #wpchill-welcome .dlm-logo {
88
+ width: 100%;
89
+ margin-bottom: 25px;
90
+ }
91
+
92
+ #wpchill-welcome .dlm-logo img {
93
+ max-width: 40px;
94
+ }
95
 
96
  #wpchill-welcome .button-wrap {
97
+ max-width: 590px;
98
+ margin: 0 auto 0 auto;
99
  }
100
 
101
  #wpchill-welcome .button-wrap .left {
103
  }
104
 
105
  #wpchill-welcome .button-wrap-single a {
106
+ font-size: 14px;
107
  }
108
 
109
  #wpchill-welcome .button-wrap-single {
132
 
133
  /* hero section */
134
  #wpchill-welcome .hero {
135
+ margin-bottom: 30px;
 
 
136
  position: relative;
137
  box-shadow: -3px 2px 70px 0px rgba(128, 144, 174, 0.1);
138
+ padding-top: 40px;
139
+ background-color: transparent;
140
+ background-image: url('../img/welcome_header_bg.png');
141
+ background-repeat: no-repeat;
142
+ background-position: center;
143
+ background-size: cover;
144
+ color: #fff;
145
+ border-radius: 0;
146
  }
147
 
148
  #wpchill-welcome .hero .mascot {
149
+ background-color: #fff;
150
+ border-radius: 50%;
151
+ height: 90px;
152
+ width: 90px;
153
  padding: 28px 28px;
154
+ position: absolute;
155
+ top: -45px;
156
+ left: 50%;
157
+ margin-left: -45px;
158
+ }
159
+
160
+ #wpchill-welcome .hero img:not(.mascot) {
161
+ max-height: 300px;
162
+ width: auto;
163
+ position: relative;
164
+ display: inline-block;
165
+ margin: 0 auto;
166
+ }
167
+
168
+ #wpchill-welcome .hero h1 {
169
+ color: #fff;
170
  }
171
 
172
  #wpchill-welcome .hero .video-thumbnail {
173
+ display: block;
174
  margin: 0;
175
  width: 100%;
176
  }
177
 
178
  #wpchill-welcome .hero .button-wrap {
179
+ margin-top: 20px;
180
  }
181
 
182
 
183
  /* features section */
184
  #wpchill-welcome .features {
 
185
  border-top-left-radius: 10px;
186
  border-top-right-radius: 10px;
187
  position: relative;
188
+ padding-top: 0px;
189
+ background: transparent;
190
+ box-shadow: none;
191
+ }
192
+
193
+ #wpchill-welcome .features hr {
194
+ border-bottom: 0;
195
+ height: 1px;
196
  }
197
 
198
  #wpchill-welcome .features .feature-list {
199
+ margin-top: 10px;
200
+ margin-left: -7px;
201
+ margin-right: -7px;
202
+ }
203
+
204
+ #wpchill-welcome .features .feature-list a {
205
+ background-color: #2271B1;
206
+ color: #FFFFFF;
207
+ text-decoration: none;
208
+ padding: 8px 16px;
209
+ display: inline-block;
210
  }
211
 
212
  #wpchill-welcome .features .feature-block {
213
  margin-bottom: 30px;
214
+ background: #fff;
215
+ width: calc(33% - 10px) !important;
216
+ margin-bottom: 10px !important;
217
+ min-height: 200px;
218
+ padding: 15px;
219
+ box-shadow: 0 0 15px rgba(0,0,0,0.1);
220
+ position: relative;
221
+ }
222
+
223
+ #wpchill-welcome .features .feature-block .feature-block__header * {
224
+ display:inline-block;
225
+ vertical-align: middle;
226
+ }
227
+
228
+ #wpchill-welcome .features .feature-block p {
229
+ margin-left: 0;
230
+ margin-top: 15px;
231
+ display: block;
232
+ width: 100%;
233
+ clear: both;
234
+ }
235
+
236
+ #wpchill-welcome .block-row {
237
+ flex-grow: 1;
238
+ flex-basis: 0;
239
+ }
240
+
241
+ #wpchill-welcome .pages-creation .block-row {
242
+ align-items: center;
243
+ box-shadow: 0 0 15px rgba(0,0,0,0.1);
244
+ }
245
+
246
+ .block.text-left.pages-creation {
247
+ margin-top: 45px;
248
+ }
249
+
250
+
251
+ #wpchill-welcome .features .feature__upgrade-to-pro {
252
+ position: absolute;
253
+ bottom: 15px;
254
+ left: 15px;
255
+ display:inline-block;
256
  }
257
 
258
  @media screen and (min-width: 720px) {
259
 
260
  #wpchill-welcome .block-row-2 .feature-block {
261
  margin: 0 auto;
262
+ float: left;
263
  width: 50%;
264
  padding-bottom: 32px;
265
  overflow: auto;
267
 
268
  #wpchill-welcome .block-row-3 .feature-block {
269
  margin: 0 auto;
270
+ float: left;
271
  width: 33%;
272
  padding-bottom: 32px;
273
  overflow: auto;
289
  #wpchill-welcome .features .feature-block.last {
290
  padding-left: 22px;
291
  }
292
+
293
  .block-row-1 > * {
294
  width: 100%;
295
  }
296
+
297
+ .block-row {
298
+ display: flex;
299
+ flex-wrap: wrap;
300
+ align-items: flex-start;
301
  flex-direction: row;
302
  justify-content: flex-start;
303
  }
315
  }
316
  }
317
 
318
+ #wpchill-welcome .features .feature-block img {
 
319
  max-width: 44px;
320
  max-height: 44px;
321
  }
322
 
323
  #wpchill-welcome .features .feature-block h5 {
324
+ margin-left: 15px;
 
 
 
 
325
  }
326
 
327
  #wpchill-welcome .features .pro-label {
328
+ display: inline-block;
329
+ line-height: 1;
330
+ color: #fff;
331
+ padding: 3px 6px;
332
+ font-size: 0.75rem;
333
+ border-radius: 20px;
334
+ vertical-align: text-top;
335
+ margin-left: 20px;
336
+ position: absolute;
337
+ top:15px;
338
+ right:15px;
339
  }
340
 
341
  #wpchill-welcome .features .feature-list a {
348
  text-align: center;
349
  }
350
 
351
+ #wpchill-welcome .upgrade h1 {
352
  color: #fff;
353
  }
354
 
355
  @media screen and (min-width: 720px) {
356
 
357
+ #wpchill-welcome .upgrade .left {
358
+ float: left;
359
  width: 50%;
360
  padding-left: 20%;
361
  margin-bottom: 30px;
362
  text-align: left;
363
  }
364
 
365
+ #wpchill-welcome .upgrade .right {
366
+ float: left;
367
  width: 50%;
368
  padding-right: 20%;
369
  margin-bottom: 30px;
379
 
380
  /* testimonials section */
381
  #wpchill-welcome .testimonials {
382
+ background: transparent;
383
+ box-shadow: none;
384
  position: relative;
385
+ }
386
+
387
+ #wpchill-welcome .testimonials .block-row {
388
+ justify-content: space-between;
389
  }
390
 
391
  #wpchill-welcome .testimonials .testimonial-block {
 
392
  overflow: auto;
393
  margin-top: 40px;
394
  text-align: center;
395
+ box-shadow: 0 0 15px rgba(0,0,0,0.1);
396
+ border-radius: 5px;
397
+ background: #fff;
398
+ width: calc(50% - 15px);
399
+ padding: 25px;
400
+ min-height: 285px;
401
  }
402
 
403
  @media screen and (min-width: 720px) {
404
 
405
  #wpchill-welcome .testimonials .testimonial-block {
406
+ float: left;
407
+ width: calc(50% - 15px);
408
+ }
409
 
410
  }
411
 
420
  max-height: 60px;
421
  border-radius: 50%;
422
  filter: grayscale(100%);
423
+ box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
424
  }
425
 
426
  /* testimonials footer */
428
  background-color: #fff;
429
  border-bottom-left-radius: 10px;
430
  border-bottom-right-radius: 10px;
431
+ margin-bottom: 30px;
432
  position: relative;
433
  box-shadow: -3px 2px 70px 0px rgba(128, 144, 174, 0.1);
434
  }
435
 
436
  #wpchill-welcome .container {
437
+ position: relative;
438
+ width: 100%;
439
+ height: 0;
440
+ padding-bottom: 56.25%;
441
  }
442
 
443
  #wpchill-welcome .video {
444
+ position: absolute;
445
+ top: 0;
446
+ left: 0;
447
+ width: 100%;
448
+ height: 100%;
449
  }
450
 
451
  #wpchill-welcome .stars_wrapper svg {
452
+ height: 20px;
453
  }
454
 
455
+ #wpchill-welcome .wpchill_empty_space {
456
+ display: block;
457
+ clear: both;
458
  }
459
 
460
  .wpchill_horizontal_delimiter {
461
  background-color: #f0f0f1;
462
+ height: 20px;
463
+ width: 100%;
464
+ margin: 0 auto;
465
+ }
466
+
467
+ #wpchill-welcome .wpmtst-btn{
468
+ width: auto;
469
  }
470
 
471
  .wpchill-text-center {
472
  text-align: center;
473
+ }
474
+
475
+ .white-bg {
476
+ background: #fff;
477
+ margin-bottom: 10px;
478
+ }
479
+
480
+ .padding-15 {
481
+ padding: 15px;
482
+ }
483
+
484
+ .padding-vertical-15 {
485
+ padding: 15px 0;
486
+ }
487
+
488
+ .padding-horizontal-15 {
489
+ padding: 15px 0;
490
+ }
491
+
492
+ html body .button.dlm-page-exists {
493
+ background: #23A870;
494
+ border: 1px solid #23A870;
495
+ cursor: initial;
496
+ box-shadow: none;
497
+ }
498
+
499
+ html body .button.dlm-page-exists, html body .button.dlm-page-exists:hover{
500
+ background: #23A870;
501
+ border: 1px solid #23A870;
502
+ cursor: initial;
503
+ box-shadow: none;
504
+ }
505
+
506
+ .features .block .button {
507
+ font-size: 14px;
508
+ min-height: 30px;
509
+ line-height: 30px;
510
+ padding: 0 16px;
511
  }
includes/submodules/banner/assets/img/welcome_header_bg.png ADDED
Binary file
includes/submodules/banner/assets/img/welcome_header_laptop.png ADDED
Binary file
includes/submodules/banner/class-wpchill-welcome.php CHANGED
@@ -45,20 +45,23 @@ if ( ! class_exists( 'WPChill_Welcome' ) ) {
45
  }
46
 
47
  /**
48
- * @since 1.0.0
49
- * Renders buttons
50
- *
51
- * @param string $text
52
  *
53
- * @param string $url
 
 
 
 
 
 
54
  *
55
- * @param bool $fill
56
- *
57
- * @param string $color
58
  */
59
- public function display_button( $text, $link, $fill = true, $color = '#5D3CE4' ) {
60
- $style = 'style="background-color:' . sanitize_hex_color( $color ) . ';border-color:' . sanitize_hex_color( $color ) . ';color:#fff;"';
61
- echo '<a href="' . esc_attr( $link ) . '" ' . ( $fill ? $style : '' ) . ' class="wpmtst-btn wpmtst-btn-block wpmtst-btn-lg">' . esc_html( $text ) . '</a>';
 
 
62
  }
63
 
64
  /**
@@ -72,15 +75,19 @@ if ( ! class_exists( 'WPChill_Welcome' ) ) {
72
  * @param string $icon (icon URL)
73
  *
74
  * @param bool $pro
 
75
  */
76
- public function display_extension( $title, $description = '', $icon = '', $pro = false, $pro_color = '#5333ED' ) {
77
 
78
  echo '<div class="feature-block">';
 
79
  if ( '' != $icon ) {
80
  echo '<img src="' . esc_attr( $icon ) . '">';
81
  }
82
  echo '<h5>' . esc_html( $title ) . ( ( $pro ) ? '<div style="background-color:' . esc_attr( $pro_color ) . '" class="pro-label">PRO</div>' : '' ) . '</h5>';
83
- echo '<p>' . esc_html( $description ) . '</p>';
 
 
84
  echo '</div>';
85
  }
86
 
@@ -190,31 +197,31 @@ if ( ! class_exists( 'WPChill_Welcome' ) ) {
190
  </g>
191
  </svg>';
192
 
193
- $svg_args = array(
194
- 'svg' => array(
195
- 'class' => true,
196
- 'aria-hidden' => true,
197
- 'aria-labelledby' => true,
198
- 'role' => true,
199
- 'xmlns' => true,
200
- 'width' => true,
201
- 'height' => true,
202
- 'viewbox' => true, // <= Must be lower case!
203
- 'id' => true,
204
- ),
205
- 'g' => array( 'fill' => true ),
206
- 'title' => array( 'title' => true ),
207
- 'path' => array(
208
- 'd' => true,
209
- 'fill' => true,
210
- ),
211
- 'style' => array( 'type' => true ),
212
- );
213
-
214
- echo '<style>';
215
- echo '.svg-' . absint( $id ) . '{ fill:' . sanitize_hex_color( $color ) . ';}';
216
- echo '</style>';
217
- echo '<div class="stars_wrapper">' . wp_kses( $star . $star . $star . $star . $star, $svg_args ) . '</div>';
218
  }
219
 
220
  /**
45
  }
46
 
47
  /**
48
+ * Display button function.
 
 
 
49
  *
50
+ * @param string $text Button text.
51
+ * @param string $link Button URL.
52
+ * @param string $class Button class.
53
+ * @param bool $fill Show style.
54
+ * @param string $color Button color.
55
+ * @param string $text_color Text color.
56
+ * @param string $border_color Border color.
57
  *
58
+ * @since 1.0.0
 
 
59
  */
60
+ public function display_button( $text, $link, $class = 'button-primary', $fill = true, $color = '#5D3CE4', $text_color = '#fff', $border_color = '' ) {
61
+ $border_color = empty( $border_color ) ? $color : $border_color;
62
+ $style = 'style="border:1px solid;background-color:' . ( 'transparent' !== $color ? sanitize_hex_color( $color ) : 'transparent' ) . ';border-color:' . sanitize_hex_color( $border_color ) . ';color:' . sanitize_hex_color( $text_color ) . ';"';
63
+ echo '<a href="' . esc_attr( $link ) . '" ' . ( $fill ? $style : '' ) . ' class="button ' . esc_attr( $class ) . '">' . esc_html( $text ) . '</a>';
64
+ //wpmtst-btn wpmtst-btn-block wpmtst-btn-lg - former button classes
65
  }
66
 
67
  /**
75
  * @param string $icon (icon URL)
76
  *
77
  * @param bool $pro
78
+ * @param string $link The URL to unlock the extension
79
  */
80
+ public function display_extension( $title, $description = '', $icon = '', $pro = false, $pro_color = '#5333ED', $extension_name = false ) {
81
 
82
  echo '<div class="feature-block">';
83
+ echo '<div class="feature-block__header">';
84
  if ( '' != $icon ) {
85
  echo '<img src="' . esc_attr( $icon ) . '">';
86
  }
87
  echo '<h5>' . esc_html( $title ) . ( ( $pro ) ? '<div style="background-color:' . esc_attr( $pro_color ) . '" class="pro-label">PRO</div>' : '' ) . '</h5>';
88
+ echo '</div>';
89
+ echo '<p>' . wp_kses_post( $description ) . '</p>';
90
+ echo $extension_name ? '<a href="https://www.download-monitor.com/pricing/?utm_source=plugin&utm_medium=extension-block&utm_campaign=' . esc_attr( $extension_name ) . '">' . esc_html__( 'Upgrade to unlock', 'download-monitor' ) . '</a>' : '';
91
  echo '</div>';
92
  }
93
 
197
  </g>
198
  </svg>';
199
 
200
+ $svg_args = array(
201
+ 'svg' => array(
202
+ 'class' => true,
203
+ 'aria-hidden' => true,
204
+ 'aria-labelledby' => true,
205
+ 'role' => true,
206
+ 'xmlns' => true,
207
+ 'width' => true,
208
+ 'height' => true,
209
+ 'viewbox' => true, // <= Must be lower case!
210
+ 'id' => true,
211
+ ),
212
+ 'g' => array( 'fill' => true ),
213
+ 'title' => array( 'title' => true ),
214
+ 'path' => array(
215
+ 'd' => true,
216
+ 'fill' => true,
217
+ ),
218
+ 'style' => array( 'type' => true ),
219
+ );
220
+
221
+ echo '<style>';
222
+ echo '.svg-' . absint( $id ) . '{ fill:' . sanitize_hex_color( $color ) . ';}';
223
+ echo '</style>';
224
+ echo '<div class="stars_wrapper">' . wp_kses( $star . $star . $star . $star . $star, $svg_args ) . '</div>';
225
  }
226
 
227
  /**
includes/tracking/class-download-monitor-usage-tracker.php CHANGED
@@ -797,6 +797,13 @@ if ( ! class_exists( 'Download_Monitor_Usage_Tracker' ) ) {
797
  */
798
  public function optin_notice() {
799
 
 
 
 
 
 
 
 
800
  // Check for plugin args.
801
  if ( isset( $_GET['plugin'] ) && $this->plugin_name === $_GET['plugin'] && isset( $_GET['plugin_action'] ) ) {
802
 
797
  */
798
  public function optin_notice() {
799
 
800
+ if ( function_exists( 'get_current_screen' ) ) {
801
+ $current_screen = get_current_screen();
802
+ if ( 'dlm_download_page_download-monitor-about-page' === $current_screen->base ) {
803
+ return;
804
+ }
805
+ }
806
+
807
  // Check for plugin args.
808
  if ( isset( $_GET['plugin'] ) && $this->plugin_name === $_GET['plugin'] && isset( $_GET['plugin_action'] ) ) {
809
 
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.1
6
- Stable tag: 4.7.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.7.3 - 1.11.2022 =
125
  Fixed: Reports not working when cache is set ( [#1113](https://github.com/WPChill/download-monitor/issues/1113) )
126
  Fixed: Security update regarding directory traversal ( [#1111](https://github.com/WPChill/download-monitor/issues/1111) )
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.1
6
+ Stable tag: 4.7.4
7
  License: GPLv3
8
  Text Domain: -
9
  Requires PHP: 5.6
121
 
122
  == Changelog ==
123
 
124
+ = 4.7.4 - 21.11.2022 =
125
+ Fix: Sorting by download count did not take into consideration the post meta ( [#1126](https://github.com/WPChill/download-monitor/issues/1126) )
126
+ Fix: Reports Downloads CPT retrieval ( [#1128](https://github.com/WPChill/download-monitor/issues/1128) )
127
+ Fix: Storing IP setting not working ( [#1124](https://github.com/WPChill/download-monitor/issues/1124) )
128
+ Fix: Visual indicator for buttons and non-content headers ( [#1119](https://github.com/WPChill/download-monitor/issues/1119) )
129
+ Changed: Reports display dates are now based on the Date Format and Time Format settings ( [#516](https://github.com/WPChill/download-monitor/issues/516) )
130
+ Added: Option to set category in the Downloads list widget ( [#659](https://github.com/WPChill/download-monitor/issues/659) )
131
+ Fixed: Exclude multiple tags in [downloads] shortcode ( [#660](https://github.com/WPChill/download-monitor/issues/660) )
132
+ Change: Set cookies "secure" flag based on server configuration ( [#687](https://github.com/WPChill/download-monitor/issues/687) )
133
+ Fixed: Bedrock installations redirect to file bug ( [#973](https://github.com/WPChill/download-monitor/issues/973) )
134
+ Fixed: Conflict between WPML and Download CPT REST APIs ( [#1118](https://github.com/WPChill/download-monitor/issues/1118) )
135
+ Fixed: Incompatiblity with WPML when languages added as parameter ( [#1112](https://github.com/WPChill/download-monitor/issues/1122) )
136
+ Fixed: Safari compatibility for filenames ( [#1125](https://github.com/WPChill/download-monitor/issues/1125) )
137
+ Changed: Upsell system for plugins page ( [#875](https://github.com/WPChill/download-monitor/issues/875) )
138
+ Added: Popup for no-access message ( [#686](https://github.com/WPChill/download-monitor/issues/686) )
139
+ Added: Option to display the "No access" message in a popup( modal ) ( [#686](https://github.com/WPChill/download-monitor/issues/686) )
140
+ Fixed: Redirect to file when from uploads / uploadsis a symlink ( [#1100](https://github.com/WPChill/download-monitor/issues/1100) )
141
+
142
  = 4.7.3 - 1.11.2022 =
143
  Fixed: Reports not working when cache is set ( [#1113](https://github.com/WPChill/download-monitor/issues/1113) )
144
  Fixed: Security update regarding directory traversal ( [#1111](https://github.com/WPChill/download-monitor/issues/1111) )
src/Admin/Extensions.php CHANGED
@@ -59,6 +59,14 @@ class DLM_Admin_Extensions {
59
  */
60
  private $installed_extensions = array();
61
 
 
 
 
 
 
 
 
 
62
  /**
63
  * Json
64
  *
@@ -136,6 +144,8 @@ class DLM_Admin_Extensions {
136
 
137
  $this->set_tabs();
138
 
 
 
139
  }
140
 
141
  /**
@@ -241,6 +251,15 @@ class DLM_Admin_Extensions {
241
  delete_transient( 'dlm_extension_json' );
242
  }
243
 
 
 
 
 
 
 
 
 
 
244
  ?>
245
  <div class="wrap dlm_extensions_wrap">
246
  <div class="icon32 icon32-posts-dlm_download" id="icon-edit"><br/></div>
@@ -281,37 +300,22 @@ class DLM_Admin_Extensions {
281
 
282
  echo '<div id="available-extensions" class="settings_panel">';
283
  echo '<div class="dlm_extensions">';
284
-
285
- foreach ( $this->extensions as $extension ) {
286
-
287
- $sale = false;
288
-
289
- if ( $extension->price > 0 ) {
290
-
291
- $price_display = '$' . $extension->price;
292
-
293
- if ( '' != $extension->sale_price && $extension->sale_price > 0 ) {
294
-
295
- $price_display = '<strike>$' . $extension->price . '</strike> $' . $extension->sale_price;
296
- $sale = true;
297
- }
298
- } else {
299
-
300
- $price_display = __( 'FREE', 'download-monitor' );
301
- }
302
-
303
- echo '<div class="dlm_extension">';
304
- echo '<a href="https://www.download-monitor.com/pricing/?utm_source=plugin&utm_medium=extension-block&utm_campaign=' . esc_attr( $extension->name ) . '" target="_blank">';
305
- echo '<div class="dlm_extension_img_wrapper"><img src="' . esc_url( $extension->image ) . '" alt="' . esc_attr( $extension->name ) . '" /></div>';
306
- echo '<h3>' . esc_html( $extension->name ) . '</h3>';
307
- echo '<div class="extension-desc">' . wp_kses_post( $extension->desc ) . '</div>';
308
- echo '<div class="product_footer">';
309
- echo '<div class="button button-secondary loop_more">' . esc_html__( 'Upgrade to Unlock', 'download-monitor' ) . '<span class="dashicons dashicons-external"></span></div>';
310
- echo '</div>';
311
- echo '</a>';
312
- echo '</div>';
313
- }
314
-
315
  echo '</div>';
316
  echo '</div>';
317
 
@@ -367,33 +371,51 @@ class DLM_Admin_Extensions {
367
  <?php
368
  // Installed Extensions
369
  if ( count( $this->installed_extensions ) > 0 ) {
 
 
370
 
 
 
 
371
  echo '<div id="installed-extensions" class="settings_panel">';
372
 
373
  echo '<div class="dlm_extensions">';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
374
 
375
- foreach ( $this->installed_extensions as $extension ) {
376
-
377
- // Get the product
378
- $license = $this->products[ $extension->product_id ]->get_license();
379
-
380
- echo '<div class="dlm_extension">';
381
-
382
- echo '<div class="dlm_extension_img_wrapper"><img src="' . esc_url( $extension->image ) . '" alt="' . esc_attr( $extension->name ) . '" /></div>';
383
- echo '<h3>' . esc_html( $extension->name ) . '</h3>';
384
-
385
- echo '<div class="extension_license">';
386
- echo '<p class="license-status' . ( ( $license->is_active() ) ? ' active' : '' ) . '">' . esc_html( strtoupper( $license->get_status() ) ) . '</p>';
387
- echo '<input type="hidden" id="dlm-ajax-nonce" value="' . esc_attr( wp_create_nonce( 'dlm-ajax-nonce' ) ) . '" />';
388
- echo '<input type="hidden" id="status" value="' . esc_attr( $license->get_status() ) . '" />';
389
- echo '<input type="hidden" id="product_id" value="' . esc_attr( $extension->product_id ) . '" />';
390
- echo '<input type="text" name="key" id="key" value="' . esc_attr( $license->get_key() ) . '" placeholder="License Key"' . ( ( $license->is_active() ) ? ' disabled="disabled"' : '' ) . ' />';
391
- echo '<input type="text" name="email" id="email" value="' . esc_attr( $license->get_email() ) . '" placeholder="License Email"' . ( ( $license->is_active() ) ? ' disabled="disabled"' : '' ) . ' />';
392
- echo '<a href="javascript:;" class="button button-primary">' . ( ( $license->is_active() ) ? 'Deactivate' : 'Activate' ) . '</a>';
393
- echo '</div>';
394
-
395
- echo '</div>';
396
- }
397
 
398
  echo '</div>';
399
  echo '</div>';
@@ -499,4 +521,44 @@ class DLM_Admin_Extensions {
499
  }
500
  return $settings;
501
  }
502
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  */
60
  private $installed_extensions = array();
61
 
62
+ /**
63
+ * DLM Licensed extensions
64
+ *
65
+ * @var array
66
+ * @since 4.7.4
67
+ */
68
+ private $licensed_extensions = array();
69
+
70
  /**
71
  * Json
72
  *
144
 
145
  $this->set_tabs();
146
 
147
+ $this->set_licensed_extensions();
148
+
149
  }
150
 
151
  /**
251
  delete_transient( 'dlm_extension_json' );
252
  }
253
 
254
+ // WPChill Welcome Class
255
+ require_once plugin_dir_path( DLM_PLUGIN_FILE ) . '/includes/submodules/banner/class-wpchill-welcome.php';
256
+
257
+ if ( ! class_exists( 'WPChill_Welcome' ) ) {
258
+ return;
259
+ }
260
+
261
+ $welcome = WPChill_Welcome::get_instance();
262
+
263
  ?>
264
  <div class="wrap dlm_extensions_wrap">
265
  <div class="icon32 icon32-posts-dlm_download" id="icon-edit"><br/></div>
300
 
301
  echo '<div id="available-extensions" class="settings_panel">';
302
  echo '<div class="dlm_extensions">';
303
+ ?>
304
+ <div id="wpchill-welcome">
305
+ <div class="features">
306
+ <div class="block">
307
+ <?php $welcome->layout_start( 3, 'feature-list clear' ); ?>
308
+ <!-- Let's display the extensions. -->
309
+ <?php
310
+ foreach ( $this->extensions as $extension ) {
311
+ $welcome->display_extension( $extension->name, wp_kses_post( $extension->desc ), $extension->image, true, '#F08232', $extension->name );
312
+ }
313
+ ?><!-- end extensions display -->
314
+ <?php $welcome->layout_end(); ?>
315
+ </div><!-- .block -->
316
+ </div><!-- .features -->
317
+ </div><!-- #wpchill-welcome -->
318
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  echo '</div>';
320
  echo '</div>';
321
 
371
  <?php
372
  // Installed Extensions
373
  if ( count( $this->installed_extensions ) > 0 ) {
374
+ // WPChill Welcome Class.
375
+ require_once plugin_dir_path( DLM_PLUGIN_FILE ) . '/includes/submodules/banner/class-wpchill-welcome.php';
376
 
377
+ if ( ! class_exists( 'WPChill_Welcome' ) ) {
378
+ return;
379
+ }
380
  echo '<div id="installed-extensions" class="settings_panel">';
381
 
382
  echo '<div class="dlm_extensions">';
383
+ ?>
384
+ <div id="wpchill-welcome">
385
+ <div class="features">
386
+ <div class="block">
387
+ <?php $welcome->layout_start( 3, 'feature-list clear' ); ?>
388
+ <!-- Let's display the extensions. -->
389
+ <?php
390
+ foreach ( $this->installed_extensions as $extension ) {
391
+ // Get the product
392
+ $license = $this->products[ $extension->product_id ]->get_license();
393
+ echo '<div class="feature-block dlm_extension">';
394
+ echo '<div class="feature-block__header">';
395
+ if ( '' != $extension->image ) {
396
+ echo '<img src="' . esc_attr( $extension->image ) . '">';
397
+ }
398
+ echo '<h5>' . esc_html( $extension->name ) . '</h5>';
399
+ echo '</div>';
400
+ echo '<p>' . wp_kses_post( $extension->desc ) . '</p>';
401
+ echo '<div class="extension_license">';
402
+ echo '<p class="license-status' . ( ( $license->is_active() ) ? ' active' : '' ) . '">' . esc_html( strtoupper( $license->get_status() ) ) . '</p>';
403
+ echo '<input type="hidden" id="dlm-ajax-nonce" value="' . esc_attr( wp_create_nonce( 'dlm-ajax-nonce' ) ) . '" />';
404
+ echo '<input type="hidden" id="status" value="' . esc_attr( $license->get_status() ) . '" />';
405
+ echo '<input type="hidden" id="product_id" value="' . esc_attr( $extension->product_id ) . '" />';
406
+ echo '<input type="text" name="key" id="key" value="' . esc_attr( $license->get_key() ) . '" placeholder="License Key"' . ( ( $license->is_active() ) ? ' disabled="disabled"' : '' ) . ' />';
407
+ echo '<input type="text" name="email" id="email" value="' . esc_attr( $license->get_email() ) . '" placeholder="License Email"' . ( ( $license->is_active() ) ? ' disabled="disabled"' : '' ) . ' />';
408
+ echo '<a href="javascript:;" class="button button-primary">' . ( ( $license->is_active() ) ? 'Deactivate' : 'Activate' ) . '</a>';
409
+ echo '</div>';
410
+ echo '</div>';
411
+ }
412
+ ?><!-- end extensions display -->
413
+ <?php $welcome->layout_end(); ?>
414
+ </div><!-- .block -->
415
+ </div><!-- .features -->
416
+ </div><!-- #wpchill-welcome -->
417
+ <?php
418
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
419
 
420
  echo '</div>';
421
  echo '</div>';
521
  }
522
  return $settings;
523
  }
524
+
525
+ /**
526
+ * Get the installed extensions
527
+ *
528
+ * @return array
529
+ */
530
+ public function get_installed_extensions() {
531
+ return $this->installed_extensions;
532
+ }
533
+
534
+ /**
535
+ * Set the licensed extensions
536
+ *
537
+ * @return void
538
+ * @since 4.7.4
539
+ */
540
+ public function set_licensed_extensions() {
541
+ global $wpdb;
542
+ // Let's retrieve extensions that have a license key.
543
+ $extensions = $wpdb->get_results( $wpdb->prepare( "SELECT `option_name`, `option_value` FROM {$wpdb->prefix}options WHERE `option_name` LIKE %s AND `option_name` LIKE %s;", $wpdb->esc_like( 'dlm-' ) . '%', '%' . $wpdb->esc_like( '-license' ) ), ARRAY_A );
544
+
545
+ foreach ( $extensions as $extension ) {
546
+ $extension_name = str_replace( '-license', '', $extension['option_name'] );
547
+ $value = unserialize( $extension['option_value'] );
548
+ // Extension must have an active status in order to be regitered.
549
+ if ( isset( $value['status'] ) && 'active' === $value['status'] ) {
550
+ $this->licensed_extensions[] = $extension_name;
551
+ }
552
+ }
553
+ }
554
+
555
+ /**
556
+ * Get the licensed extensions
557
+ *
558
+ * @return array
559
+ * @since 4.7.4
560
+ */
561
+ public function get_licensed_extensions() {
562
+ return $this->licensed_extensions;
563
+ }
564
+ }
src/Admin/Reports/Page.php CHANGED
@@ -198,6 +198,8 @@ class DLM_Reports_Page {
198
  </div>
199
  </div>
200
  </div>
 
 
201
  <?php
202
  }
203
 
198
  </div>
199
  </div>
200
  </div>
201
+ <!-- Textarea used to decode HTML entities that are retrieved from RESTP API -->
202
+ <textarea id="dlm_reports_decode_area" class="hidden"></textarea>
203
  <?php
204
  }
205
 
src/Admin/Reports/class-dlm-reports.php CHANGED
@@ -34,6 +34,13 @@ if ( ! class_exists( 'DLM_Reports' ) ) {
34
  */
35
  public $php_info = array();
36
 
 
 
 
 
 
 
 
37
  /**
38
  * DLM_Reports constructor.
39
  *
@@ -41,6 +48,8 @@ if ( ! class_exists( 'DLM_Reports' ) ) {
41
  */
42
  public function __construct() {
43
 
 
 
44
  $this->php_info = array(
45
  'memory_limit' => ini_get( 'memory_limit' ),
46
  'max_execution_time' => ini_get( 'max_execution_time' ),
@@ -134,8 +143,15 @@ if ( ! class_exists( 'DLM_Reports' ) ) {
134
  $rest_route_user_reports = rest_url() . 'download-monitor/v1/user_reports';
135
  $rest_route_user_data = rest_url() . 'download-monitor/v1/user_data';
136
  $rest_route_templates = rest_url() . 'download-monitor/v1/templates';
 
 
 
 
 
 
 
137
  // Let's add the global variable that will hold our reporst class and the routes.
138
- wp_add_inline_script( 'dlm_reports', 'let dlmReportsInstance = {}; dlm_admin_url = "' . admin_url() . '" ; const dlmDownloadReportsAPI ="' . $rest_route_download_reports . '"; const dlmUserReportsAPI ="' . $rest_route_user_reports . '"; const dlmUserDataAPI ="' . $rest_route_user_data . '"; const dlmTemplates = "' . $rest_route_templates . '"; const dlmPHPinfo = ' . wp_json_encode( $this->php_info ) . ';', 'before' );
139
  }
140
 
141
  /**
@@ -295,7 +311,9 @@ if ( ! class_exists( 'DLM_Reports' ) ) {
295
  )
296
  );
297
  $table_columns = sanitize_text_field( implode( ',', wp_unslash( $table_columns ) ) );
298
- $downloads = $wpdb->get_results( $wpdb->prepare( 'SELECT ' . $table_columns . ' FROM ' . $wpdb->download_log . " ORDER BY ID desc LIMIT {$offset_limit}, {$count};" ), ARRAY_A );
 
 
299
 
300
  return array(
301
  'logs' => $downloads,
@@ -305,6 +323,21 @@ if ( ! class_exists( 'DLM_Reports' ) ) {
305
 
306
  }
307
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
308
  /**
309
  * Return user data
310
  *
34
  */
35
  public $php_info = array();
36
 
37
+ /**
38
+ * The time format
39
+ *
40
+ * @var string
41
+ */
42
+ public $date_format = 'Y-m-d H:i:s';
43
+
44
  /**
45
  * DLM_Reports constructor.
46
  *
48
  */
49
  public function __construct() {
50
 
51
+ $this->date_format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
52
+
53
  $this->php_info = array(
54
  'memory_limit' => ini_get( 'memory_limit' ),
55
  'max_execution_time' => ini_get( 'max_execution_time' ),
143
  $rest_route_user_reports = rest_url() . 'download-monitor/v1/user_reports';
144
  $rest_route_user_data = rest_url() . 'download-monitor/v1/user_data';
145
  $rest_route_templates = rest_url() . 'download-monitor/v1/templates';
146
+ $cpt_fields = apply_filters( 'dlm_reports_downloads_cpt', array(
147
+ 'author',
148
+ 'id',
149
+ 'title',
150
+ 'slug'
151
+ ) );
152
+ $rest_rout_downloadscpt = rest_url() . 'wp/v2/dlm_download?_fields=' . implode( ',', $cpt_fields );
153
  // Let's add the global variable that will hold our reporst class and the routes.
154
+ wp_add_inline_script( 'dlm_reports', 'let dlmReportsInstance = {}; dlm_admin_url = "' . admin_url() . '" ; const dlmDownloadReportsAPI ="' . $rest_route_download_reports . '"; const dlmUserReportsAPI ="' . $rest_route_user_reports . '"; const dlmUserDataAPI ="' . $rest_route_user_data . '"; const dlmTemplates = "' . $rest_route_templates . '"; const dlmDownloadsCptApiapi = "' . $rest_rout_downloadscpt . '"; const dlmPHPinfo = ' . wp_json_encode( $this->php_info ) . ';', 'before' );
155
  }
156
 
157
  /**
311
  )
312
  );
313
  $table_columns = sanitize_text_field( implode( ',', wp_unslash( $table_columns ) ) );
314
+ $downloads = $wpdb->get_results( $wpdb->prepare( 'SELECT ' . $table_columns . ', UNIX_TIMESTAMP( download_date ) as display_date FROM ' . $wpdb->download_log . " ORDER BY ID desc LIMIT {$offset_limit}, {$count};" ), ARRAY_A );
315
+
316
+ $downloads = array_map( array( $this, 'date_creator' ), $downloads );
317
 
318
  return array(
319
  'logs' => $downloads,
323
 
324
  }
325
 
326
+ /**
327
+ * Create WordPress generated date
328
+ *
329
+ * @param $element
330
+ *
331
+ * @return mixed
332
+ * @since 4.7.4
333
+ */
334
+ public function date_creator( $element ) {
335
+
336
+ $element['display_date'] = wp_date( $this->date_format, $element['display_date'] );
337
+
338
+ return $element;
339
+ }
340
+
341
  /**
342
  * Return user data
343
  *
src/Admin/Settings/Settings.php CHANGED
@@ -165,13 +165,13 @@ class DLM_Admin_Settings {
165
  'std' => 'download',
166
  'placeholder' => __( 'download', 'download-monitor' ),
167
  'label' => __( 'Download Endpoint', 'download-monitor' ),
168
- 'desc' => sprintf( __( 'Define what endpoint should be used for download links. By default this will be <code>%s</code>.', 'download-monitor' ), home_url( '/download/' ) ),
169
  ),
170
  array(
171
  'name' => 'dlm_download_endpoint_value',
172
  'std' => 'ID',
173
  'label' => __( 'Endpoint Value', 'download-monitor' ),
174
- 'desc' => sprintf( __( 'Define what unique value should be used on the end of your endpoint to identify the downloadable file. e.g. ID would give a link like <code>%s</code>', 'download-monitor' ), home_url( '/download/10/' ) ),
175
  'type' => 'select',
176
  'options' => array(
177
  'ID' => __( 'Download ID', 'download-monitor' ),
@@ -199,6 +199,14 @@ class DLM_Admin_Settings {
199
  'desc' => __( "The message that will be displayed to visitors when they don't have access to a file.", 'download-monitor' ),
200
  'type' => 'textarea',
201
  ),
 
 
 
 
 
 
 
 
202
  array(
203
  'name' => 'dlm_ip_blacklist',
204
  'std' => '192.168.0.0/24',
165
  'std' => 'download',
166
  'placeholder' => __( 'download', 'download-monitor' ),
167
  'label' => __( 'Download Endpoint', 'download-monitor' ),
168
+ 'desc' => sprintf( __( 'Define what endpoint should be used for download links. By default this will be <code>%s</code> ( %s ).', 'download-monitor' ), 'download', esc_url( home_url( ) ) . '<code>/download/</code>' ),
169
  ),
170
  array(
171
  'name' => 'dlm_download_endpoint_value',
172
  'std' => 'ID',
173
  'label' => __( 'Endpoint Value', 'download-monitor' ),
174
+ 'desc' => sprintf( __( 'Define what unique value should be used on the end of your endpoint to identify the downloadable file. e.g. ID would give a link like <code>10</code> ( %s%s )', 'download-monitor' ), home_url( '/download/' ), '<code>10/</code>' ),
175
  'type' => 'select',
176
  'options' => array(
177
  'ID' => __( 'Download ID', 'download-monitor' ),
199
  'desc' => __( "The message that will be displayed to visitors when they don't have access to a file.", 'download-monitor' ),
200
  'type' => 'textarea',
201
  ),
202
+ array(
203
+ 'name' => 'dlm_no_access_modal',
204
+ 'std' => '0',
205
+ 'label' => __( 'No Access Modal', 'download-monitor' ),
206
+ 'cb_label' => '',
207
+ 'desc' => __( 'Open no access message in a modal (pop-up) window.', 'download-monitor' ),
208
+ 'type' => 'checkbox',
209
+ ),
210
  array(
211
  'name' => 'dlm_ip_blacklist',
212
  'std' => '192.168.0.0/24',
src/Admin/class-dlm-db-upgrader.php CHANGED
@@ -416,7 +416,7 @@ if ( ! class_exists( 'DLM_DB_Upgrader' ) ) {
416
  }
417
  set_transient( 'dlm_db_upgrade_offset', absint( $_POST['offset'] ) );
418
  // We save the previous so that we make sure all the entries from that range will be saved.
419
- wp_send_json( $offset );
420
  exit;
421
  }
422
 
416
  }
417
  set_transient( 'dlm_db_upgrade_offset', absint( $_POST['offset'] ) );
418
  // We save the previous so that we make sure all the entries from that range will be saved.
419
+ wp_send_json_success( $offset );
420
  exit;
421
  }
422
 
src/AjaxHandler.php CHANGED
@@ -23,6 +23,8 @@ class DLM_Ajax_Handler {
23
  add_action( 'wp_ajax_dlm_extension', array( $this, 'handle_extensions' ) );
24
  add_action( 'wp_ajax_dlm_dismiss_notice', array( $this, 'dismiss_notice' ) );
25
  add_action( 'wp_ajax_dlm_update_file_meta', array( $this, 'save_attachment_meta' ) );
 
 
26
  }
27
 
28
  /**
@@ -320,4 +322,101 @@ class DLM_Ajax_Handler {
320
  update_post_meta( absint( $_POST['file_id'] ), 'dlm_download', $meta );
321
  wp_send_json_success();
322
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  }
23
  add_action( 'wp_ajax_dlm_extension', array( $this, 'handle_extensions' ) );
24
  add_action( 'wp_ajax_dlm_dismiss_notice', array( $this, 'dismiss_notice' ) );
25
  add_action( 'wp_ajax_dlm_update_file_meta', array( $this, 'save_attachment_meta' ) );
26
+ add_action( 'wp_ajax_nopriv_no_access_dlm_xhr_download', array( $this, 'xhr_no_access_modal' ), 15 );
27
+ add_action( 'wp_ajax_no_access_dlm_xhr_download', array( $this, 'xhr_no_access_modal' ), 15 );
28
  }
29
 
30
  /**
322
  update_post_meta( absint( $_POST['file_id'] ), 'dlm_download', $meta );
323
  wp_send_json_success();
324
  }
325
+
326
+
327
+ /**
328
+ * Log the XHR download
329
+ *
330
+ * @return void
331
+ */
332
+ public function xhr_no_access_modal() {
333
+
334
+ if ( ! isset( $_POST['download_id'] ) || ! isset( $_POST['version_id'] ) ) {
335
+ if ( '1' === get_option( 'dlm_xsendfile_enabled' ) ) {
336
+ wp_send_json_error( 'Missing download_id or version_id. X-Sendfile is enabled, so this is a problem.' );
337
+ }
338
+ wp_send_json_error( 'Missing download_id or version_id' );
339
+ }
340
+
341
+ check_ajax_referer( 'dlm_ajax_nonce', 'nonce' );
342
+
343
+ // Action to allow the adition of extra scripts and code related to the shortcode.
344
+ do_action( 'dlm_dlm_no_access_shortcode_scripts' );
345
+
346
+ $atts = array(
347
+ 'show_message' => 'true',
348
+ );
349
+
350
+ ob_start();
351
+
352
+ // template handler.
353
+ $template_handler = new DLM_Template_Handler();
354
+
355
+ if ( 'empty-download' === $_POST['download_id'] || ( isset( $_POST['modal_text'] ) && ! empty( $_POST['modal_text'] ) ) ) {
356
+ if ( isset( $_POST['modal_text'] ) && ! empty( $_POST['modal_text'] ) ) {
357
+ echo sanitize_text_field( wp_unslash( $_POST['modal_text'] ) );
358
+ } else {
359
+ echo '<p>' . __( 'You do not have permission to download this file.', 'download-monitor' ) . '</p>';
360
+ }
361
+ } else {
362
+
363
+ try {
364
+ /** @var \DLM_Download $download */
365
+ $download = download_monitor()->service( 'download_repository' )->retrieve_single( absint( $_POST['download_id'] ) );
366
+ $version = ( 'empty-download' !== $_POST['download_id'] ) ? download_monitor()->service( 'version_repository' )->retrieve_single( absint( $_POST['version_id'] ) ) : $download->get_version();
367
+ $download->set_version( $version );
368
+
369
+ // load no access template.
370
+ $template_handler->get_template_part(
371
+ 'no-access',
372
+ '',
373
+ '',
374
+ array(
375
+ 'download' => $download,
376
+ 'no_access_message' => ( ( $atts['show_message'] ) ? wp_kses_post( get_option( 'dlm_no_access_error', '' ) ) : '' )
377
+ )
378
+ );
379
+ } catch ( Exception $exception ) {
380
+ wp_send_json_error( 'No download found' );
381
+ }
382
+ }
383
+
384
+ $restriction_type = isset( $_POST['restriction'] ) && 'restriction-empty' !== $_POST['restriction'] ? sanitize_text_field( wp_unslash( $_POST['restriction'] ) ) : 'no_access_page';
385
+
386
+ $title = apply_filters(
387
+ 'dlm_modal_title',
388
+ array(
389
+ 'no_file_path' => __( 'Error!', 'download-monitor' ),
390
+ 'no_file_paths' => __( 'Error!', 'download-monitor' ),
391
+ 'access_denied' => __( 'No access!', 'download-monitor' ),
392
+ 'file_not_found' => __( 'Error!', 'download-monitor' ),
393
+ 'not_found' => __( 'Error!', 'download-monitor' ),
394
+ 'filetype' => __( 'No access!', 'download-monitor' ),
395
+ 'no_access_page' => __( 'No access!', 'download-monitor' ),
396
+ )
397
+ );
398
+ $content = ob_get_clean();
399
+ $modal_template = '
400
+ <div id="dlm-no-access-modal" >
401
+ <div class="dlm-no-access-modal-overlay">
402
+
403
+ </div>
404
+ <div class="dlm-no-access-modal-window">
405
+ <div class="dlm-no-access-modal__header">
406
+ <span class="dlm-no-access-modal__title">' . esc_html( $title[ $restriction_type ] ) . ' </span>
407
+ <span class="dlm-no-access-modal-close" title="' . esc_attr__( 'Close Modal', 'download-monitor' ) . '"> <span class="dashicons dashicons-no"></span>
408
+ </div>
409
+ <div class="dlm-no-access-modal__body">
410
+ ' . $content . '
411
+ </div>
412
+ <div class="dlm-no-access-modal__footer">
413
+ <button class="dlm-no-access-modal-close">' . esc_html__( 'Close', 'download-monitor' ) . '</button>
414
+ </div>
415
+ </div>
416
+ </div>';
417
+ // Content and variables escaped above.
418
+ // $content variable escaped from extensions as it may include inputs or other HTML elements.
419
+ echo $modal_template; //phpcs:ignore
420
+ die();
421
+ }
422
  }
src/CookieManager.php CHANGED
@@ -50,19 +50,30 @@ class DLM_Cookie_Manager {
50
  * @param DLM_Download $download
51
  */
52
  public static function set_cookie( $download ) {
53
-
54
- $cookie_data = apply_filters( 'wp_dlm_set_downloading_cookie', array( 'expires' => time() + 60, 'secure' => false, 'httponly' => true ) );
 
 
 
 
 
 
 
55
  setcookie(
56
  self::KEY,
57
- base64_encode( json_encode( array(
58
- 'download' => $download->get_id(),
59
- 'version' => $download->get_version()->get_version_number()
60
- ) ) ),
 
 
 
 
61
  $cookie_data['expires'],
62
  COOKIEPATH,
63
  COOKIE_DOMAIN,
64
  $cookie_data['secure'],
65
- $cookie_data['httponly'] );
 
66
  }
67
-
68
- }
50
  * @param DLM_Download $download
51
  */
52
  public static function set_cookie( $download ) {
53
+ $secure = is_ssl();
54
+ $cookie_data = apply_filters(
55
+ 'wp_dlm_set_downloading_cookie',
56
+ array(
57
+ 'expires' => time() + 60,
58
+ 'secure' => $secure,
59
+ 'httponly' => true
60
+ )
61
+ );
62
  setcookie(
63
  self::KEY,
64
+ base64_encode(
65
+ json_encode(
66
+ array(
67
+ 'download' => $download->get_id(),
68
+ 'version' => $download->get_version()->get_version_number()
69
+ )
70
+ )
71
+ ),
72
  $cookie_data['expires'],
73
  COOKIEPATH,
74
  COOKIE_DOMAIN,
75
  $cookie_data['secure'],
76
+ $cookie_data['httponly']
77
+ );
78
  }
79
+ }
 
src/DLM.php CHANGED
@@ -124,8 +124,9 @@ class WP_DLM {
124
  $lu_ajax->setup();
125
 
126
  // Onboarding
127
- $onboarding = new Util\Onboarding();
128
- $onboarding->setup();
 
129
 
130
  // Admin Download Page Options Upsells
131
  new DLM_Admin_OptionsUpsells();
@@ -189,6 +190,10 @@ class WP_DLM {
189
  $post_type_manager = new DLM_Post_Type_Manager();
190
  $post_type_manager->setup();
191
 
 
 
 
 
192
  // Setup actions
193
  $this->setup_actions();
194
 
@@ -308,7 +313,7 @@ class WP_DLM {
308
  wp_register_style( 'dlm-frontend', $this->get_plugin_url() . '/assets/css/frontend.min.css' );
309
  }
310
 
311
- // only enqueue preview stylesheet when we're in the preview
312
  if ( isset( $_GET['dlm_gutenberg_download_preview'] ) ) {
313
  // Enqueue admin css
314
  wp_enqueue_style(
@@ -319,7 +324,7 @@ class WP_DLM {
319
  );
320
  }
321
 
322
- // Leave this filter here in case XHR is problematic and needs to be disabled
323
  if ( self::do_xhr() ) {
324
  wp_enqueue_script(
325
  'dlm-xhr',
@@ -328,6 +333,11 @@ class WP_DLM {
328
  DLM_VERSION, true
329
  );
330
 
 
 
 
 
 
331
  $dlm_xhr_data = apply_filters(
332
  'dlm_xhr_data',
333
  array(
@@ -347,7 +357,7 @@ class WP_DLM {
347
  );
348
 
349
  $xhr_data = array_merge( $dlm_xhr_data, $dlm_xhr_security_data );
350
-
351
  wp_add_inline_script('dlm-xhr', 'const dlmXHR = ' . json_encode( $xhr_data ) . '; dlmXHRinstance = {};', 'before');
352
  wp_localize_script('dlm-xhr', 'dlmXHRtranslations', array(
353
  'error' => __('An error occurred while trying to download the file. Please try again.', 'download-monitor')
124
  $lu_ajax->setup();
125
 
126
  // Onboarding
127
+ // Delete this after new welcome banner.
128
+ /* $onboarding = new Util\Onboarding();
129
+ $onboarding->setup();*/
130
 
131
  // Admin Download Page Options Upsells
132
  new DLM_Admin_OptionsUpsells();
190
  $post_type_manager = new DLM_Post_Type_Manager();
191
  $post_type_manager->setup();
192
 
193
+ // Setup Log Filters
194
+ $log_filters = new DLM_Log_Filters();
195
+ $log_filters->setup();
196
+
197
  // Setup actions
198
  $this->setup_actions();
199
 
313
  wp_register_style( 'dlm-frontend', $this->get_plugin_url() . '/assets/css/frontend.min.css' );
314
  }
315
 
316
+ // only enqueue preview stylesheet when we're in the preview.
317
  if ( isset( $_GET['dlm_gutenberg_download_preview'] ) ) {
318
  // Enqueue admin css
319
  wp_enqueue_style(
324
  );
325
  }
326
 
327
+ // Leave this filter here in case XHR is problematic and needs to be disabled.
328
  if ( self::do_xhr() ) {
329
  wp_enqueue_script(
330
  'dlm-xhr',
333
  DLM_VERSION, true
334
  );
335
 
336
+ // Add dashicons on the front if popup modal for no access is used.
337
+ if ( '1' === get_option( 'dlm_no_access_modal', 0 ) ) {
338
+ wp_enqueue_style( 'dashicons' );
339
+ }
340
+
341
  $dlm_xhr_data = apply_filters(
342
  'dlm_xhr_data',
343
  array(
357
  );
358
 
359
  $xhr_data = array_merge( $dlm_xhr_data, $dlm_xhr_security_data );
360
+
361
  wp_add_inline_script('dlm-xhr', 'const dlmXHR = ' . json_encode( $xhr_data ) . '; dlmXHRinstance = {};', 'before');
362
  wp_localize_script('dlm-xhr', 'dlmXHRtranslations', array(
363
  'error' => __('An error occurred while trying to download the file. Please try again.', 'download-monitor')
src/Download/Download.php CHANGED
@@ -415,6 +415,9 @@ class DLM_Download {
415
  $value = $this->id;
416
  break;
417
  }
 
 
 
418
 
419
  if ( get_option( 'permalink_structure' ) ) {
420
  // Fix for translation plugins that modify the home_url
@@ -424,6 +427,10 @@ class DLM_Download {
424
  $link = add_query_arg( $endpoint, $value, home_url( '', $scheme ) );
425
  }
426
 
 
 
 
 
427
  // Add the timestamp to the Download's link to prevent unwanted behaviour with caching plugins/hosts
428
  $timestamp = time();
429
  $link = add_query_arg( 'tmstv', $timestamp, $link );
@@ -1041,4 +1048,17 @@ class DLM_Download {
1041
  public function get_non_logged_in_downloads() {
1042
  return $this->non_logged_in_downloads;
1043
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
1044
  }
415
  $value = $this->id;
416
  break;
417
  }
418
+ // If WPML is active we should return the original home_url to avoid 404 pages.
419
+ //@todo: If Downloads will be made translatable in the future then this should be removed.
420
+ add_filter( 'wpml_get_home_url', array( $this, 'wpml_download_link' ), 15, 2 );
421
 
422
  if ( get_option( 'permalink_structure' ) ) {
423
  // Fix for translation plugins that modify the home_url
427
  $link = add_query_arg( $endpoint, $value, home_url( '', $scheme ) );
428
  }
429
 
430
+ // Now we can remove the filter as the link is generated.
431
+ //@todo: If Downloads will be made translatable in the future then this should be removed.
432
+ remove_filter( 'wpml_get_home_url', array( $this, 'wpml_download_link' ), 15, 2 );
433
+
434
  // Add the timestamp to the Download's link to prevent unwanted behaviour with caching plugins/hosts
435
  $timestamp = time();
436
  $link = add_query_arg( 'tmstv', $timestamp, $link );
1048
  public function get_non_logged_in_downloads() {
1049
  return $this->non_logged_in_downloads;
1050
  }
1051
+
1052
+ /**
1053
+ * Fix for WPML setting language for download links. IF the downloads are made trasnlatable this will need to be deleted.
1054
+ *
1055
+ * @param string $home_url Home URL made by WPML.
1056
+ * @param string $url Original URL.
1057
+ *
1058
+ * @return string $home_url The correct home URL for Download Monitor.
1059
+ */
1060
+ public function wpml_download_link( $home_url, $url ) {
1061
+
1062
+ return $url;
1063
+ }
1064
  }
src/Download/WordPressDownloadRepository.php CHANGED
@@ -215,7 +215,14 @@ class DLM_WordPress_Download_Repository implements DLM_Download_Repository {
215
  // First, let's check if WPML is installed and activated - check for it's class.
216
  if ( class_exists( 'SitePress' ) ) {
217
  global $sitepress;
218
- $sitepress->switch_lang( 'all' );
 
 
 
 
 
 
 
219
  }
220
 
221
  $q = new WP_Query();
215
  // First, let's check if WPML is installed and activated - check for it's class.
216
  if ( class_exists( 'SitePress' ) ) {
217
  global $sitepress;
218
+ if ( is_admin() && function_exists( 'get_current_screen' ) ) {
219
+ $current_screen = get_current_screen();
220
+ if ( ! isset( $current_screen->post_type ) || 'dlm_download' !== $current_screen->post_type ) {
221
+ $sitepress->switch_lang( 'all' );
222
+ }
223
+ } else {
224
+ $sitepress->switch_lang( 'all' );
225
+ }
226
  }
227
 
228
  $q = new WP_Query();
src/DownloadHandler.php CHANGED
@@ -275,6 +275,8 @@ class DLM_Download_Handler {
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
  }
@@ -285,6 +287,8 @@ class DLM_Download_Handler {
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
  }
@@ -319,6 +323,8 @@ class DLM_Download_Handler {
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
  }
@@ -347,6 +353,8 @@ class DLM_Download_Handler {
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
  }
@@ -389,6 +397,8 @@ class DLM_Download_Handler {
389
  if ( empty( $file_paths ) ) {
390
  if ( $this->check_for_xhr() ) {
391
  header( 'DLM-Error: ' . esc_html__( 'No file paths defined.', 'download-monitor' ) );
 
 
392
  http_response_code( 404 );
393
  exit;
394
  }
@@ -404,6 +414,8 @@ class DLM_Download_Handler {
404
  if ( ! $file_path ) {
405
  if ( $this->check_for_xhr() ) {
406
  header( 'DLM-Error: ' . esc_html__( 'No file path defined.', 'download-monitor' ) );
 
 
407
  http_response_code( 404 );
408
  exit;
409
  }
@@ -420,6 +432,8 @@ class DLM_Download_Handler {
420
  if ( $restriction ) {
421
  if ( $this->check_for_xhr() ) {
422
  header( 'DLM-Error: ' . esc_html__( 'Access denied to this file.', 'download-monitor' ) );
 
 
423
  http_response_code( 403 );
424
  exit;
425
  }
@@ -475,18 +489,20 @@ class DLM_Download_Handler {
475
 
476
  if ( $this->check_for_xhr() ) {
477
  header( 'DLM-Redirect: ' . $no_access_permalink );
478
- header( 'DLM-No-Access: true' );
479
  exit;
480
  }
481
  // redirect to no access page.
482
  header( "Status: 301 redirect,$no_access_permalink" );
483
  wp_redirect( $no_access_permalink );
484
- exit; // out
485
  }
486
  }
487
 
488
  if ( $this->check_for_xhr() ) {
489
  header( 'DLM-Error: ' . esc_html__( 'Access denied. You do not have permission to download this file.', 'download-monitor' ) );
 
 
490
  exit;
491
  }
492
 
@@ -525,29 +541,45 @@ class DLM_Download_Handler {
525
 
526
  // If it's not a remote file we need to create the correct URL.
527
  if ( ! $remote_file ) {
528
- // Ensure we have a valid URL, not a file path.
529
- $scheme = wp_parse_url( get_option( 'home' ), PHP_URL_SCHEME );
530
- // At this point the $correct_path should have a value of the file path as the verification was made prior to this check
531
- // If there are symbolik links the return of the function will be an URL, so the last replace will not be taken into consideration.
532
- $file_path = download_monitor()->service( 'file_manager' )->check_symbolic_links( $file_path, true );
533
- $file_path = str_replace( trailingslashit( $correct_path ), site_url( '/', $scheme ), $file_path );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
534
  }
535
 
536
- if ( $this->check_for_xhr() ) {
537
- // We need to urlencode in case there are unicode characters in the file name.
538
- // Get file name.
539
- $file_name = DLM_Utils::basename( $file_path );
540
 
541
- if ( strstr( $file_name, '?' ) ) {
542
- $file_name = current( explode( '?', $file_name ) );
543
- }
 
 
544
 
545
- $file_path = str_replace( $file_name, urlencode( $file_name ), $file_path );
546
  header( 'DLM-Redirect: ' . $file_path );
547
  exit;
548
  }
549
 
550
-
551
  header( 'X-Robots-Tag: noindex, nofollow', true );
552
  header( 'Location: ' . $file_path );
553
  exit;
@@ -612,7 +644,7 @@ class DLM_Download_Handler {
612
  $new_length = $range_end - $range;
613
  }
614
 
615
- header( $_SERVER['SERVER_PROTOCOL'] . " 206 Partial Content" );
616
  header( "Content-Length: $new_length" );
617
  header( "Content-Range: bytes {$range}-{$range_end}/{$version->get_filesize()}" );
618
 
@@ -639,6 +671,8 @@ class DLM_Download_Handler {
639
 
640
  if ( $this->check_for_xhr() ) {
641
  header( 'DLM-Error: ' . esc_html__( 'File not found.', 'download-monitor' ) );
 
 
642
  exit;
643
  }
644
 
@@ -718,17 +752,18 @@ class DLM_Download_Handler {
718
  }
719
 
720
  $headers = array();
721
-
 
 
722
  if ( $this->check_for_xhr() ) {
723
- // We use this method to encode the filename for XHR requests so that file names with characters like
724
- // chinese or persian can be named correctly after the download.
725
- $file_name = urlencode( $file_name );
726
  }
727
-
728
  $headers['X-Robots-Tag'] = 'noindex, nofollow';
729
  $headers['Content-Type'] = $mime_type;
730
  $headers['Content-Description'] = 'File Transfer';
731
- $headers['Content-Disposition'] = "attachment; filename=\"{$file_name}\";";
732
  $headers['Content-Transfer-Encoding'] = 'binary';
733
 
734
  if ( $remote_file ) {
@@ -842,7 +877,31 @@ class DLM_Download_Handler {
842
  *
843
  * @return bool
844
  */
845
- private function check_for_xhr(){
846
  return defined( 'DLM_DOING_XHR' ) && DLM_DOING_XHR;
847
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
848
  }
275
  } catch ( Exception $e ) {
276
  if ( $this->check_for_xhr() ) {
277
  header( 'DLM-Error: ' . esc_html__( 'Download does not exist.', 'download-monitor' ) );
278
+ $restriction_type = 'not_found';
279
+ $this->set_no_access_modal( __( 'Download does not exist.', 'download-monitor' ), $download, $restriction_type );
280
  http_response_code( 404 );
281
  exit;
282
  }
287
  if ( ! $download ) {
288
  if ( $this->check_for_xhr() ) {
289
  header( 'DLM-Error: ' . esc_html__( 'Download does not exist.', 'download-monitor' ) );
290
+ $restriction_type = 'not_found';
291
+ $this->set_no_access_modal( __( 'Download does not exist.', 'download-monitor' ), $download, $restriction_type );
292
  http_response_code( 404 );
293
  exit;
294
  }
323
  if ( in_array( $download->get_version()->get_filetype(), $restricted_file_types ) ) {
324
  if ( $this->check_for_xhr() ) {
325
  header( 'DLM-Error: ' . esc_html__( 'Download is not allowed for this file type.', 'download-monitor' ) );
326
+ $restriction_type = 'filetype';
327
+ $this->set_no_access_modal( __( 'Download is not allowed for this file type.', 'download-monitor' ), $download, $restriction_type );
328
  http_response_code( 403 );
329
  exit;
330
  }
353
  } else {
354
  if ( $this->check_for_xhr() ) {
355
  header( 'DLM-Error: ' . esc_html__( 'Download does not exist.', 'download-monitor' ) );
356
+ $restriction_type = 'not_found';
357
+ $this->set_no_access_modal( __( 'Download does not exist.', 'download-monitor' ), $download, $restriction_type );
358
  http_response_code( 404 );
359
  exit;
360
  }
397
  if ( empty( $file_paths ) ) {
398
  if ( $this->check_for_xhr() ) {
399
  header( 'DLM-Error: ' . esc_html__( 'No file paths defined.', 'download-monitor' ) );
400
+ $restriction_type = 'no_file_paths';
401
+ $this->set_no_access_modal( __( 'No file paths defined', 'download-monitor' ), $download, $restriction_type );
402
  http_response_code( 404 );
403
  exit;
404
  }
414
  if ( ! $file_path ) {
415
  if ( $this->check_for_xhr() ) {
416
  header( 'DLM-Error: ' . esc_html__( 'No file path defined.', 'download-monitor' ) );
417
+ $restriction_type = 'no_file_path';
418
+ $this->set_no_access_modal( __( 'No file path defined', 'download-monitor' ), $download, $restriction_type );
419
  http_response_code( 404 );
420
  exit;
421
  }
432
  if ( $restriction ) {
433
  if ( $this->check_for_xhr() ) {
434
  header( 'DLM-Error: ' . esc_html__( 'Access denied to this file.', 'download-monitor' ) );
435
+ $restriction_type = 'access_denied';
436
+ $this->set_no_access_modal( __( 'Access denied to this file.', 'download-monitor' ), $download, $restriction_type );
437
  http_response_code( 403 );
438
  exit;
439
  }
489
 
490
  if ( $this->check_for_xhr() ) {
491
  header( 'DLM-Redirect: ' . $no_access_permalink );
492
+ $this->set_no_access_modal( false, $download, 'no_access_page' );
493
  exit;
494
  }
495
  // redirect to no access page.
496
  header( "Status: 301 redirect,$no_access_permalink" );
497
  wp_redirect( $no_access_permalink );
498
+ exit; // out.
499
  }
500
  }
501
 
502
  if ( $this->check_for_xhr() ) {
503
  header( 'DLM-Error: ' . esc_html__( 'Access denied. You do not have permission to download this file.', 'download-monitor' ) );
504
+ $restriction_type = 'access_denied';
505
+ $this->set_no_access_modal( __( 'Access denied. You do not have permission to download this file.', 'download-monitor' ), $download, $restriction_type );
506
  exit;
507
  }
508
 
541
 
542
  // If it's not a remote file we need to create the correct URL.
543
  if ( ! $remote_file ) {
544
+
545
+ // Let's check if the file is in the uploads' folder.
546
+ $uploads_dir = wp_upload_dir();
547
+ $file_path = str_replace( DIRECTORY_SEPARATOR, '/', $file_path );
548
+ $basedir = str_replace( DIRECTORY_SEPARATOR, '/', $uploads_dir['basedir'] );
549
+ $sympath = str_replace( DIRECTORY_SEPARATOR, '/', readlink( $basedir ) );
550
+
551
+ if ( false !== strpos( $file_path, $basedir ) ) { // File is in the uploads' folder, so we need to create the correct URL.
552
+ // Set the URL for the uploads' folder.
553
+ $file_path = str_replace( str_replace( DIRECTORY_SEPARATOR, '/', trailingslashit( $basedir ) ), str_replace( DIRECTORY_SEPARATOR, '/', trailingslashit( $uploads_dir['baseurl'] ) ), $file_path );
554
+ } elseif ( is_link( $basedir ) && false !== strpos( $file_path, $sympath ) ) { // File is in the uploads' folder but in symlinked directory, so we need to create the correct URL.
555
+ // Set the URL for the uploads' folder.
556
+ $file_path = str_replace( str_replace( DIRECTORY_SEPARATOR, '/', trailingslashit( $sympath ) ), str_replace( DIRECTORY_SEPARATOR, '/', trailingslashit( $uploads_dir['baseurl'] ) ), $file_path );
557
+ } else { // This is the case if the file is not located in the uploads' folder.
558
+ // Ensure we have a valid URL, not a file path.
559
+ $scheme = wp_parse_url( get_option( 'home' ), PHP_URL_SCHEME );
560
+ // At this point the $correct_path should have a value of the file path as the verification was made prior to this check
561
+ // If there are symbolik links the return of the function will be an URL, so the last replace will not be taken into consideration.
562
+ $file_path = download_monitor()->service( 'file_manager' )->check_symbolic_links( $file_path, true );
563
+ $file_path = str_replace( trailingslashit( $correct_path ), site_url( '/', $scheme ), $file_path );
564
+ }
565
  }
566
 
567
+ // We need to rawurlencode in case there are unicode characters in the file name
568
+ // and to prevent white space from being converted to + sign.
569
+ // Get file name.
570
+ $file_name = DLM_Utils::basename( $file_path );
571
 
572
+ if ( strstr( $file_name, '?' ) ) {
573
+ $file_name = current( explode( '?', $file_name ) );
574
+ }
575
+
576
+ $file_path = str_replace( $file_name, rawurlencode( $file_name ), $file_path );
577
 
578
+ if ( $this->check_for_xhr() ) {
579
  header( 'DLM-Redirect: ' . $file_path );
580
  exit;
581
  }
582
 
 
583
  header( 'X-Robots-Tag: noindex, nofollow', true );
584
  header( 'Location: ' . $file_path );
585
  exit;
644
  $new_length = $range_end - $range;
645
  }
646
 
647
+ header( $_SERVER['SERVER_PROTOCOL'] . ' 206 Partial Content' );
648
  header( "Content-Length: $new_length" );
649
  header( "Content-Range: bytes {$range}-{$range_end}/{$version->get_filesize()}" );
650
 
671
 
672
  if ( $this->check_for_xhr() ) {
673
  header( 'DLM-Error: ' . esc_html__( 'File not found.', 'download-monitor' ) );
674
+ $restriction_type = 'file_not_found';
675
+ $this->set_no_access_modal( __( 'File not found.', 'download-monitor' ), $download, $restriction_type );
676
  exit;
677
  }
678
 
752
  }
753
 
754
  $headers = array();
755
+ // We use this method to encode the filename so that file names with characters like
756
+ // chinese or persian can be named correctly after the download in Safari.
757
+ $file_name = rawurlencode( $file_name );
758
  if ( $this->check_for_xhr() ) {
759
+ $headers['Content-Disposition'] = "attachment; filename=\"{$file_name}\";";
760
+ } else {
761
+ $headers['Content-Disposition'] = "attachment; filename*=UTF-8''{$file_name};";
762
  }
763
+
764
  $headers['X-Robots-Tag'] = 'noindex, nofollow';
765
  $headers['Content-Type'] = $mime_type;
766
  $headers['Content-Description'] = 'File Transfer';
 
767
  $headers['Content-Transfer-Encoding'] = 'binary';
768
 
769
  if ( $remote_file ) {
877
  *
878
  * @return bool
879
  */
880
+ private function check_for_xhr() {
881
  return defined( 'DLM_DOING_XHR' ) && DLM_DOING_XHR;
882
  }
883
+
884
+ /**
885
+ * Set headers for Modal opening
886
+ *
887
+ * @param string $text The text to be displayed.
888
+ * @param object $download The download object.
889
+ * @param string $restriction_type The restriction type.
890
+ *
891
+ * @return void
892
+ * @since 4.7.4
893
+ */
894
+ public function set_no_access_modal( $text, $download, $restriction_type ) {
895
+ $access_modal = absint( get_option( 'dlm_no_access_modal', 0 ) );
896
+
897
+ if ( 0 !== $access_modal ) {
898
+ header( 'DLM-No-Access: true' );
899
+ }
900
+
901
+ header( 'DLM-No-Access-Modal: ' . apply_filters( 'do_dlm_xhr_access_modal', $access_modal, $download ) );
902
+ header( 'DLM-No-Access-Restriction: ' . $restriction_type );
903
+ if ( ! empty( $text ) ) {
904
+ header( 'DLM-No-Access-Modal-Text: ' . apply_filters( 'do_dlm_xhr_access_modal_text', $text, $download, $restriction_type ) );
905
+ }
906
+ }
907
  }
src/Logs/LogFilters.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DLM_Log_Filters {
4
+
5
+ /**
6
+ * Setup filters for log items
7
+ */
8
+ public function setup() {
9
+ add_filter( 'dlm_log_item', array( $this, 'filter_ip_address' ), 1, 1 );
10
+ add_filter( 'dlm_log_item', array( $this, 'filter_ua' ), 1, 1 );
11
+ }
12
+
13
+ /**
14
+ * Filter IP address in log item based on settings
15
+ *
16
+ * @param DLM_Log_Item $log_item
17
+ *
18
+ * @return DLM_Log_Item
19
+ */
20
+ public function filter_ip_address( $log_item ) {
21
+
22
+ $logging = new DLM_Logging();
23
+ $ip_type = $logging->get_ip_logging_type();
24
+
25
+
26
+ switch ( $ip_type ) {
27
+ case 'anonymized':
28
+ // replace last part of IP address with xxx
29
+ $ip_parts = explode( ".", $log_item->get_user_ip() );
30
+
31
+ // remove last chunk and add new last chunk with xxx
32
+ array_pop( $ip_parts );
33
+ $ip_parts[] = "xxx";
34
+
35
+ $log_item->set_user_ip( implode( '.', $ip_parts ) );
36
+ break;
37
+ case 'none':
38
+ // set an empty string
39
+ $log_item->set_user_ip( '' );
40
+ break;
41
+ case 'full':
42
+ default:
43
+ // do nothing
44
+ break;
45
+ }
46
+
47
+ return $log_item;
48
+ }
49
+
50
+ /**
51
+ * Filter user agent in log item based on settings
52
+ *
53
+ * @param DLM_Log_Item $log_item
54
+ *
55
+ * @return DLM_Log_Item
56
+ */
57
+ public function filter_ua( $log_item ) {
58
+
59
+ $logging = new DLM_Logging();
60
+
61
+ if ( ! $logging->is_ua_logging_enabled() ) {
62
+ $log_item->set_user_agent( '' );
63
+ }
64
+
65
+ return $log_item;
66
+ }
67
+ }
src/Shortcodes.php CHANGED
@@ -326,10 +326,11 @@ class DLM_Shortcodes {
326
  'paginate' => false
327
  ), $atts ) );
328
 
329
- $post__in = ! empty( $include ) ? explode( ',', $include ) : '';
330
- $post__not_in = ! empty( $exclude ) ? explode( ',', $exclude ) : '';
331
- $order = strtoupper( $order );
332
- $meta_key = '';
 
333
  $order_by_count = '';
334
 
335
  switch ( $orderby ) {
@@ -367,7 +368,7 @@ class DLM_Shortcodes {
367
  'order_by_count' => $order_by_count,
368
  );
369
 
370
- if ( $category || $tag || $exclude_tag ) {
371
  $args['tax_query'] = array( 'relation' => 'AND' );
372
 
373
  $tags = array_filter( explode( ',', $tag ) );
@@ -429,11 +430,11 @@ class DLM_Shortcodes {
429
  );
430
  }
431
 
432
- if ( ! empty( $exclude_tag ) ) {
433
  $args['tax_query'][] = array(
434
  'taxonomy' => 'dlm_download_tag',
435
  'field' => 'slug',
436
- 'terms' => $exclude_tag,
437
  'operator' => 'NOT IN'
438
  );
439
  }
326
  'paginate' => false
327
  ), $atts ) );
328
 
329
+ $post__in = ! empty( $include ) ? explode( ',', $include ) : '';
330
+ $post__not_in = ! empty( $exclude ) ? explode( ',', $exclude ) : '';
331
+ $tag_not_in = ! empty( $exclude_tag ) ? explode( ',', $exclude_tag ) : '';
332
+ $order = strtoupper( $order );
333
+ $meta_key = '';
334
  $order_by_count = '';
335
 
336
  switch ( $orderby ) {
368
  'order_by_count' => $order_by_count,
369
  );
370
 
371
+ if ( $category || $tag || ! empty( $tag_not_in ) ) {
372
  $args['tax_query'] = array( 'relation' => 'AND' );
373
 
374
  $tags = array_filter( explode( ',', $tag ) );
430
  );
431
  }
432
 
433
+ if ( ! empty( $tag_not_in ) ) {
434
  $args['tax_query'][] = array(
435
  'taxonomy' => 'dlm_download_tag',
436
  'field' => 'slug',
437
+ 'terms' => $tag_not_in,
438
  'operator' => 'NOT IN'
439
  );
440
  }
src/Widgets/Downloads.php CHANGED
@@ -39,13 +39,13 @@ class DLM_Widget_Downloads extends WP_Widget {
39
  /**
40
  * widget function.
41
  *
42
- * @see WP_Widget
43
- * @access public
44
- *
45
  * @param array $args
46
  * @param array $instance
47
  *
48
  * @return void
 
 
 
49
  */
50
  public function widget( $args, $instance ) {
51
 
@@ -59,19 +59,20 @@ class DLM_Widget_Downloads extends WP_Widget {
59
  $order = isset( $instance['order'] ) ? $instance['order'] : 'ASC';
60
  $featured = isset( $instance['featured'] ) ? $instance['featured'] : 'no';
61
  $members_only = isset( $instance['members_only'] ) ? $instance['members_only'] : 'no';
 
62
 
63
  $args = array(
64
- 'post_status' => 'publish',
65
- 'post_type' => 'dlm_download',
66
- 'no_found_rows' => 1,
67
- 'orderby' => $orderby,
68
- 'order' => $order,
69
- 'meta_query' => array(),
70
- 'tax_query' => array()
71
  );
72
 
73
  if ( $orderby == 'download_count' ) {
74
- $args['order_by_count'] = '1';
75
  }
76
 
77
  if ( $featured == 'yes' ) {
@@ -88,6 +89,14 @@ class DLM_Widget_Downloads extends WP_Widget {
88
  );
89
  }
90
 
 
 
 
 
 
 
 
 
91
  // fetch downloads
92
  $downloads = download_monitor()->service( 'download_repository' )->retrieve( $args, $posts_per_page );
93
 
@@ -126,13 +135,13 @@ class DLM_Widget_Downloads extends WP_Widget {
126
  /**
127
  * update function.
128
  *
129
- * @see WP_Widget->update
130
- * @access public
131
- *
132
  * @param array $new_instance
133
  * @param array $old_instance
134
  *
135
  * @return array
 
 
 
136
  */
137
  public function update( $new_instance, $old_instance ) {
138
  $instance = $old_instance;
@@ -143,6 +152,7 @@ class DLM_Widget_Downloads extends WP_Widget {
143
  $instance['order'] = sanitize_text_field( $new_instance['order'] );
144
  $instance['featured'] = isset( $new_instance['featured'] ) ? $new_instance['featured'] : 'no';
145
  $instance['members_only'] = isset( $new_instance['members_only'] ) ? $new_instance['members_only'] : 'no';
 
146
 
147
  return $instance;
148
  }
@@ -150,12 +160,12 @@ class DLM_Widget_Downloads extends WP_Widget {
150
  /**
151
  * form function.
152
  *
153
- * @see WP_Widget->form
154
- * @access public
155
- *
156
  * @param array $instance
157
  *
158
  * @return void
 
 
 
159
  */
160
  public function form( $instance ) {
161
  $title = isset( $instance['title'] ) ? $instance['title'] : __( 'Featured Downloads', 'download-monitor' );
@@ -165,69 +175,100 @@ class DLM_Widget_Downloads extends WP_Widget {
165
  $order = isset( $instance['order'] ) ? $instance['order'] : 'ASC';
166
  $featured = isset( $instance['featured'] ) ? $instance['featured'] : 'no';
167
  $members_only = isset( $instance['members_only'] ) ? $instance['members_only'] : 'no';
 
 
168
  ?>
169
- <p>
170
- <label
171
- for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php echo esc_html__( 'Title', 'download-monitor' ); ?>
172
- :</label>
173
- <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"
174
- name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text"
175
- value="<?php echo esc_attr( $title ); ?>"/>
176
- </p>
177
- <p>
178
- <label
179
- for="<?php echo esc_attr( $this->get_field_id( 'posts_per_page' ) ); ?>"><?php echo esc_html__( 'Limit', 'download-monitor' ); ?>
180
- :</label>
181
- <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'posts_per_page' ) ); ?>"
182
- name="<?php echo esc_attr( $this->get_field_name( 'posts_per_page' ) ); ?>" type="text"
183
- value="<?php echo esc_attr( $posts_per_page ); ?>" size="3"/>
184
- </p>
185
- <p>
186
- <label
187
- for="<?php echo esc_attr($this->get_field_id( 'format' )); ?>"><?php echo esc_html__( 'Output template', 'download-monitor' ); ?>
188
- :</label>
189
- <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>"
190
- name="<?php echo esc_attr( $this->get_field_name( 'format' ) ); ?>" type="text"
191
- value="<?php echo esc_attr( $format ); ?>"
192
- placeholder="<?php echo esc_attr__( 'Default template', 'download-monitor' ); ?>"/>
193
- </p>
194
- <p>
195
- <label
196
- for="<?php echo esc_attr( $this->get_field_id( 'orderby' ) ); ?>"><?php echo esc_html__( 'Order by', 'download-monitor' ); ?>
197
- :</label>
198
- <select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'orderby' ) ); ?>"
199
- name="<?php echo esc_attr( $this->get_field_name( 'orderby' ) ); ?>" type="text">
200
- <option value="title" <?php selected( $orderby, 'title' ); ?>><?php echo esc_html__( 'Title', 'download-monitor' ); ?></option>
201
- <option value="rand" <?php selected( $orderby, 'rand' ); ?>><?php echo esc_html__( 'Random', 'download-monitor' ); ?></option>
202
- <option value="ID" <?php selected( $orderby, 'ID' ); ?>><?php esc_html_e( 'ID', 'download-monitor' ); ?></option>
203
- <option value="date" <?php selected( $orderby, 'date' ); ?>><?php echo esc_html__( 'Date added', 'download-monitor' ); ?></option>
204
- <option value="modified" <?php selected( $orderby, 'modified' ); ?>><?php echo esc_html__( 'Date modified', 'download-monitor' ); ?></option>
205
- <option value="download_count" <?php selected( $orderby, 'download_count' ); ?>><?php echo esc_html__( 'Download count', 'download-monitor' ); ?></option>
206
- </select>
207
- </p>
208
- <p>
209
- <label
210
- for="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>"><?php echo esc_html__( 'Order', 'download-monitor' ); ?>
211
- :</label>
212
- <select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'order' ) ); ?>" type="text">
213
- <option value="ASC" <?php selected( $order, 'ASC' ); ?>><?php echo esc_html__( 'ASC', 'download-monitor' ); ?></option>
214
- <option value="DESC" <?php selected( $order, 'DESC' ); ?>><?php echo esc_html__( 'DESC', 'download-monitor' ); ?></option>
215
- </select>
216
- </p>
217
- <p>
218
- <input id="<?php echo esc_attr( $this->get_field_id( 'featured' ) ); ?>"
219
- name="<?php echo esc_attr( $this->get_field_name( 'featured' ) ); ?>"
220
- type="checkbox" <?php checked( $featured, 'yes' ); ?> value="yes" />
221
- <label
222
- for="<?php echo esc_attr( $this->get_field_id( 'featured' ) ); ?>"><?php echo esc_html__( 'Show only featured downloads', 'download-monitor' ); ?></label>
223
- </p>
224
- <p>
225
- <input id="<?php echo esc_attr( $this->get_field_id( 'members_only' ) ); ?>"
226
- name="<?php echo esc_attr( $this->get_field_name( 'members_only' ) ); ?>"
227
- type="checkbox" <?php checked( $members_only, 'yes' ); ?> value="yes" />
228
- <label
229
- for="<?php echo esc_attr( $this->get_field_id( 'members_only' ) ); ?>"><?php echo esc_html__( 'Show only members only downloads', 'download-monitor' ); ?></label>
230
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
231
  <?php
232
  }
233
- }
39
  /**
40
  * widget function.
41
  *
 
 
 
42
  * @param array $args
43
  * @param array $instance
44
  *
45
  * @return void
46
+ * @see WP_Widget
47
+ * @access public
48
+ *
49
  */
50
  public function widget( $args, $instance ) {
51
 
59
  $order = isset( $instance['order'] ) ? $instance['order'] : 'ASC';
60
  $featured = isset( $instance['featured'] ) ? $instance['featured'] : 'no';
61
  $members_only = isset( $instance['members_only'] ) ? $instance['members_only'] : 'no';
62
+ $category = isset( $instance['category'] ) ? $instance['category'] : 'all';
63
 
64
  $args = array(
65
+ 'post_status' => 'publish',
66
+ 'post_type' => 'dlm_download',
67
+ 'no_found_rows' => 1,
68
+ 'orderby' => $orderby,
69
+ 'order' => $order,
70
+ 'meta_query' => array(),
71
+ 'tax_query' => array()
72
  );
73
 
74
  if ( $orderby == 'download_count' ) {
75
+ $args['order_by_count'] = '1';
76
  }
77
 
78
  if ( $featured == 'yes' ) {
89
  );
90
  }
91
 
92
+ if ( 'all' !== $category ) {
93
+ $args['tax_query'][] = array(
94
+ 'taxonomy' => 'dlm_download_category',
95
+ 'field' => 'slug',
96
+ 'terms' => $category
97
+ );
98
+ }
99
+
100
  // fetch downloads
101
  $downloads = download_monitor()->service( 'download_repository' )->retrieve( $args, $posts_per_page );
102
 
135
  /**
136
  * update function.
137
  *
 
 
 
138
  * @param array $new_instance
139
  * @param array $old_instance
140
  *
141
  * @return array
142
+ * @see WP_Widget->update
143
+ * @access public
144
+ *
145
  */
146
  public function update( $new_instance, $old_instance ) {
147
  $instance = $old_instance;
152
  $instance['order'] = sanitize_text_field( $new_instance['order'] );
153
  $instance['featured'] = isset( $new_instance['featured'] ) ? $new_instance['featured'] : 'no';
154
  $instance['members_only'] = isset( $new_instance['members_only'] ) ? $new_instance['members_only'] : 'no';
155
+ $instance['category'] = isset( $new_instance['category'] ) ? $new_instance['category'] : 'all';
156
 
157
  return $instance;
158
  }
160
  /**
161
  * form function.
162
  *
 
 
 
163
  * @param array $instance
164
  *
165
  * @return void
166
+ * @see WP_Widget->form
167
+ * @access public
168
+ *
169
  */
170
  public function form( $instance ) {
171
  $title = isset( $instance['title'] ) ? $instance['title'] : __( 'Featured Downloads', 'download-monitor' );
175
  $order = isset( $instance['order'] ) ? $instance['order'] : 'ASC';
176
  $featured = isset( $instance['featured'] ) ? $instance['featured'] : 'no';
177
  $members_only = isset( $instance['members_only'] ) ? $instance['members_only'] : 'no';
178
+ $category = isset( $instance['category'] ) ? $instance['category'] : 'all';
179
+ $cats = get_terms( 'dlm_download_category', array( 'hide_empty' => false ) );
180
  ?>
181
+ <p>
182
+ <label
183
+ for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php echo esc_html__( 'Title', 'download-monitor' ); ?>
184
+ :</label>
185
+ <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"
186
+ name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text"
187
+ value="<?php echo esc_attr( $title ); ?>"/>
188
+ </p>
189
+ <p>
190
+ <label
191
+ for="<?php echo esc_attr( $this->get_field_id( 'posts_per_page' ) ); ?>"><?php echo esc_html__( 'Limit', 'download-monitor' ); ?>
192
+ :</label>
193
+ <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'posts_per_page' ) ); ?>"
194
+ name="<?php echo esc_attr( $this->get_field_name( 'posts_per_page' ) ); ?>" type="text"
195
+ value="<?php echo esc_attr( $posts_per_page ); ?>" size="3"/>
196
+ </p>
197
+ <p>
198
+ <label
199
+ for="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>"><?php echo esc_html__( 'Output template', 'download-monitor' ); ?>
200
+ :</label>
201
+ <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>"
202
+ name="<?php echo esc_attr( $this->get_field_name( 'format' ) ); ?>" type="text"
203
+ value="<?php echo esc_attr( $format ); ?>"
204
+ placeholder="<?php echo esc_attr__( 'Default template', 'download-monitor' ); ?>"/>
205
+ </p>
206
+ <p>
207
+ <label
208
+ for="<?php echo esc_attr( $this->get_field_id( 'orderby' ) ); ?>"><?php echo esc_html__( 'Order by', 'download-monitor' ); ?>
209
+ :</label>
210
+ <select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'orderby' ) ); ?>"
211
+ name="<?php echo esc_attr( $this->get_field_name( 'orderby' ) ); ?>" type="text">
212
+ <option
213
+ value="title" <?php selected( $orderby, 'title' ); ?>><?php echo esc_html__( 'Title', 'download-monitor' ); ?></option>
214
+ <option
215
+ value="rand" <?php selected( $orderby, 'rand' ); ?>><?php echo esc_html__( 'Random', 'download-monitor' ); ?></option>
216
+ <option
217
+ value="ID" <?php selected( $orderby, 'ID' ); ?>><?php esc_html_e( 'ID', 'download-monitor' ); ?></option>
218
+ <option
219
+ value="date" <?php selected( $orderby, 'date' ); ?>><?php echo esc_html__( 'Date added', 'download-monitor' ); ?></option>
220
+ <option
221
+ value="modified" <?php selected( $orderby, 'modified' ); ?>><?php echo esc_html__( 'Date modified', 'download-monitor' ); ?></option>
222
+ <option
223
+ value="download_count" <?php selected( $orderby, 'download_count' ); ?>><?php echo esc_html__( 'Download count', 'download-monitor' ); ?></option>
224
+ </select>
225
+ </p>
226
+ <p>
227
+ <label
228
+ for="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>"><?php echo esc_html__( 'Order', 'download-monitor' ); ?>
229
+ :</label>
230
+ <select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>"
231
+ name="<?php echo esc_attr( $this->get_field_name( 'order' ) ); ?>" type="text">
232
+ <option
233
+ value="ASC" <?php selected( $order, 'ASC' ); ?>><?php echo esc_html__( 'ASC', 'download-monitor' ); ?></option>
234
+ <option
235
+ value="DESC" <?php selected( $order, 'DESC' ); ?>><?php echo esc_html__( 'DESC', 'download-monitor' ); ?></option>
236
+ </select>
237
+ </p>
238
+ <p>
239
+ <label
240
+ for="<?php echo esc_attr( $this->get_field_id( 'category' ) ); ?>"><?php echo esc_html__( 'Category', 'download-monitor' ); ?>
241
+ :</label>
242
+ <select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'category' ) ); ?>"
243
+ name="<?php echo esc_attr( $this->get_field_name( 'category' ) ); ?>" type="text">
244
+ <option
245
+ value="all" <?php selected( $category, 'all' ); ?>><?php echo esc_html__( 'All', 'download-monitor' ); ?></option>
246
+ <?php
247
+ if ( ! empty( $cats ) ) {
248
+ foreach ( $cats as $cat ) {
249
+ ?>
250
+ <option
251
+ value="<?php echo esc_attr( $cat->slug ); ?>>" <?php selected( $category, $cat->slug ); ?>><?php echo esc_html( $cat->name ); ?></option>
252
+ <?php
253
+ }
254
+ }
255
+ ?>
256
+ </select>
257
+ </p>
258
+ <p>
259
+ <input id="<?php echo esc_attr( $this->get_field_id( 'featured' ) ); ?>"
260
+ name="<?php echo esc_attr( $this->get_field_name( 'featured' ) ); ?>"
261
+ type="checkbox" <?php checked( $featured, 'yes' ); ?> value="yes"/>
262
+ <label
263
+ for="<?php echo esc_attr( $this->get_field_id( 'featured' ) ); ?>"><?php echo esc_html__( 'Show only featured downloads', 'download-monitor' ); ?></label>
264
+ </p>
265
+ <p>
266
+ <input id="<?php echo esc_attr( $this->get_field_id( 'members_only' ) ); ?>"
267
+ name="<?php echo esc_attr( $this->get_field_name( 'members_only' ) ); ?>"
268
+ type="checkbox" <?php checked( $members_only, 'yes' ); ?> value="yes"/>
269
+ <label
270
+ for="<?php echo esc_attr( $this->get_field_id( 'members_only' ) ); ?>"><?php echo esc_html__( 'Show only members only downloads', 'download-monitor' ); ?></label>
271
+ </p>
272
  <?php
273
  }
274
+ }
vendor/composer/autoload_classmap.php CHANGED
@@ -73,6 +73,7 @@ return array(
73
  'DLM_LU_Download_Upgrader' => $baseDir . '/src/LegacyUpgrader/DownloadUpgrader.php',
74
  'DLM_LU_Message' => $baseDir . '/src/LegacyUpgrader/Message.php',
75
  'DLM_LU_Page' => $baseDir . '/src/LegacyUpgrader/Page.php',
 
76
  'DLM_Log_Item' => $baseDir . '/src/Logs/LogItem.php',
77
  'DLM_Log_Item_Repository' => $baseDir . '/src/Logs/LogItemRepository.php',
78
  'DLM_Logging' => $baseDir . '/src/Logs/Logging.php',
73
  'DLM_LU_Download_Upgrader' => $baseDir . '/src/LegacyUpgrader/DownloadUpgrader.php',
74
  'DLM_LU_Message' => $baseDir . '/src/LegacyUpgrader/Message.php',
75
  'DLM_LU_Page' => $baseDir . '/src/LegacyUpgrader/Page.php',
76
+ 'DLM_Log_Filters' => $baseDir . '/src/Logs/LogFilters.php',
77
  'DLM_Log_Item' => $baseDir . '/src/Logs/LogItem.php',
78
  'DLM_Log_Item_Repository' => $baseDir . '/src/Logs/LogItemRepository.php',
79
  'DLM_Logging' => $baseDir . '/src/Logs/Logging.php',
vendor/composer/autoload_static.php CHANGED
@@ -88,6 +88,7 @@ class ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a
88
  'DLM_LU_Download_Upgrader' => __DIR__ . '/../..' . '/src/LegacyUpgrader/DownloadUpgrader.php',
89
  'DLM_LU_Message' => __DIR__ . '/../..' . '/src/LegacyUpgrader/Message.php',
90
  'DLM_LU_Page' => __DIR__ . '/../..' . '/src/LegacyUpgrader/Page.php',
 
91
  'DLM_Log_Item' => __DIR__ . '/../..' . '/src/Logs/LogItem.php',
92
  'DLM_Log_Item_Repository' => __DIR__ . '/../..' . '/src/Logs/LogItemRepository.php',
93
  'DLM_Logging' => __DIR__ . '/../..' . '/src/Logs/Logging.php',
88
  'DLM_LU_Download_Upgrader' => __DIR__ . '/../..' . '/src/LegacyUpgrader/DownloadUpgrader.php',
89
  'DLM_LU_Message' => __DIR__ . '/../..' . '/src/LegacyUpgrader/Message.php',
90
  'DLM_LU_Page' => __DIR__ . '/../..' . '/src/LegacyUpgrader/Page.php',
91
+ 'DLM_Log_Filters' => __DIR__ . '/../..' . '/src/Logs/LogFilters.php',
92
  'DLM_Log_Item' => __DIR__ . '/../..' . '/src/Logs/LogItem.php',
93
  'DLM_Log_Item_Repository' => __DIR__ . '/../..' . '/src/Logs/LogItemRepository.php',
94
  'DLM_Logging' => __DIR__ . '/../..' . '/src/Logs/Logging.php',