Download Monitor - Version 4.4.0

Version Description

Download this release

Release Info

Developer barrykooij
Plugin Icon 128x128 Download Monitor
Version 4.4.0
Comparing to
See all releases

Code changes from version 4.3.0 to 4.4.0

Files changed (81) hide show
  1. assets/css/admin.css +1 -1
  2. assets/css/admin.less +46 -0
  3. assets/css/frontend.css +1 -1
  4. assets/css/preview.css +1 -1
  5. assets/js/blockui.min.js +1 -14
  6. assets/js/edit-download.min.js +1 -1
  7. assets/js/edit-product.min.js +0 -0
  8. assets/js/extensions.min.js +1 -1
  9. assets/js/insert-download.min.js +1 -1
  10. assets/js/notices.min.js +1 -1
  11. assets/js/onboarding.min.js +1 -1
  12. assets/js/overview-download.min.js +1 -1
  13. assets/js/reports/charts-date-range-selector.min.js +1 -1
  14. assets/js/reports/reports.min.js +1 -1
  15. assets/js/select2/select2.min.css +1 -0
  16. assets/js/select2/select2.min.js +1 -0
  17. assets/js/settings.min.js +1 -1
  18. assets/js/shop/admin-order-details.min.js +1 -1
  19. assets/js/shop/checkout.min.js +1 -1
  20. assets/js/shop/edit-product.js +3 -0
  21. assets/js/shop/edit-product.min.js +1 -0
  22. assets/views/meta-box/product-information.php +53 -0
  23. assets/views/meta-box/shop.php +0 -39
  24. download-monitor.php +3 -3
  25. readme.txt +12 -3
  26. src/Admin/Admin.php +15 -1
  27. src/Admin/AdminScripts.php +33 -1
  28. src/Admin/Settings/Settings.php +63 -45
  29. src/Admin/Settings/SettingsHelper.php +11 -9
  30. src/Admin/WritePanels.php +0 -30
  31. src/Download/Download.php +0 -17
  32. src/Download/WordPressDownloadRepository.php +0 -36
  33. src/DownloadHandler.php +8 -4
  34. src/Installer.php +1 -1
  35. src/PostTypeManager.php +5 -1
  36. src/Shop/Access/Manager.php +45 -11
  37. src/Shop/Admin/DownloadOption.php +46 -0
  38. src/Shop/Admin/OrderTable.php +11 -8
  39. src/Shop/Admin/Pages/Orders.php +2 -1
  40. src/Shop/Admin/ProductTableColumns.php +85 -0
  41. src/Shop/Admin/WritePanels.php +108 -17
  42. src/Shop/Cart/Cart.php +1 -1
  43. src/Shop/Cart/Item/Factory.php +15 -12
  44. src/Shop/Cart/Item/Item.php +6 -6
  45. src/Shop/Cart/Manager.php +8 -8
  46. src/Shop/Checkout/PaymentGateway/PayPal/ExecutePaymentListener.php +2 -2
  47. src/Shop/Checkout/PaymentGateway/PayPal/PayPalGateway.php +1 -1
  48. src/Shop/DownloadProduct/DownloadProduct.php +0 -118
  49. src/Shop/Email/VarParser.php +38 -18
  50. src/Shop/Order/Manager.php +1 -1
  51. src/Shop/Order/OrderItem.php +6 -6
  52. src/Shop/Order/WordPressRepository.php +18 -17
  53. src/Shop/Product/Factory.php +18 -0
  54. src/Shop/Product/Product.php +281 -0
  55. src/Shop/Product/Repository.php +42 -0
  56. src/Shop/Product/WordPressRepository.php +187 -0
  57. src/Shop/Services/ServiceProvider.php +8 -0
  58. src/Shop/Session/Item/Factory.php +3 -3
  59. src/Shop/Session/Item/Item.php +9 -9
  60. src/Shop/Session/WordPressRepository.php +1 -1
  61. src/Shop/Shortcode/Buy.php +6 -9
  62. src/Shop/Util/Assets.php +1 -1
  63. src/Shop/Util/Page.php +3 -3
  64. src/Shop/Util/PostType.php +92 -0
  65. src/Shop/Util/TemplateInjector.php +75 -0
  66. src/Shop/bootstrap.php +25 -0
  67. src/Shop/functions.php +12 -0
  68. src/Shortcodes.php +20 -0
  69. src/UpgradeManager.php +7 -0
  70. templates/shop/button/add-to-cart-box.php +5 -5
  71. templates/shop/button/add-to-cart.php +4 -4
  72. templates/shop/cart/item.php +1 -1
  73. templates/shop/checkout/order-complete.php +49 -31
  74. templates/shop/content-single-product.php +19 -0
  75. templates/shop/email/elements/downloads-table-plain.php +11 -5
  76. templates/shop/email/elements/downloads-table.php +26 -18
  77. templates/shop/email/new-order.php +1 -1
  78. vendor/autoload.php +1 -1
  79. vendor/composer/autoload_classmap.php +8 -1
  80. vendor/composer/autoload_real.php +4 -4
  81. vendor/composer/autoload_static.php +12 -5
assets/css/admin.css CHANGED
@@ -1 +1 @@
1
- .post-type-dlm_download h1 a.dlm-delete-logs{color:#a00}.post-type-dlm_download h1 a.dlm-delete-logs:hover{color:#fff;background:#a00;border-color:#7C0900}#dlm_logs td{padding:7px;vertical-align:middle}#dlm_logs .check-column{width:1.5em;padding:0;vertical-align:middle}#dlm_logs .column-status{width:2em}#dlm_logs td.column-status{font-size:10px;vertical-align:middle;text-align:center}#dlm_logs td.column-status span{color:#fff;font-weight:400;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;height:18px;line-height:18px;width:18px;display:inline-block;background:url(../images/log-status-icons.png) top left no-repeat}#dlm_logs td.column-status .completed{background-color:#6cc644}#dlm_logs td.column-status .failed{background-color:#bd2c00;background-position-y:-18px}#dlm_logs td.column-status .redirected{background-color:#1c769b;background-position-y:-36px}#dlm_logs td.column-user_agent,#dlm_logs td.column-user_ip{font-family:monospace;font-weight:400}#dlm_logs span.dlm-description{font-weight:400}#dlm_logs .column-download,#dlm_logs .column-file,#dlm_logs .column-user,#dlm_logs .column-user_ua{width:16%!important}#dlm_logs .column-date,#dlm_logs .column-user_ip{width:6%!important}.post-type-dlm_download .inline-edit-row .inline-edit-col-dlm .inline-edit-col-dlm-inner{margin-top:10px}.nav-section-wrapper{padding:0;margin:0}.nav-section-wrapper li{display:inline-block;padding:0 0 0 2px;margin:0 2px}.nav-section-wrapper li a{text-decoration:none}.nav-section-wrapper li.active-section a{font-weight:700;color:#000}.nav-section-wrapper li:after{content:"|";padding-left:7px}.nav-section-wrapper li:last-child:after{content:"";padding:0}.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}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;-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-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;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-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-members_only{width:3.5em}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:"\f338";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-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-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-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-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-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;border-bottom:1px solid #DFDFDF;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}#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 .dlm-metabox{background:#ececec;border:1px solid #ececec;margin:9px 0!important}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3{margin:0!important;padding:6px!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:move}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 button{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 strong{font-weight:400;line-height:24px}#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;height:24px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox:hover h3 .handlediv{display: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;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 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 .dlm-metabox:first-child h3{background:#EAF2FA;background-image:linear-gradient(bottom,#dae6f2 0,#eaf2fa 100%);background-image:-o-linear-gradient(bottom,#dae6f2 0,#eaf2fa 100%);background-image:-moz-linear-gradient(bottom,#dae6f2 0,#eaf2fa 100%);background-image:-webkit-linear-gradient(bottom,#dae6f2 0,#eaf2fa 100%);background-image:-ms-linear-gradient(bottom,#dae6f2 0,#eaf2fa 100%);background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#dae6f2),color-stop(1,#eaf2fa));border-color:#d3deea;color:#21759B}#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_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-information p{overflow:hidden}#download-monitor-information p label{width:100%;font-weight:700;box-sizing:border-box;line-height:28px;float:left}#download-monitor-information p label input{width:65%;padding:5px;font-size:11px;font-weight:400;background:#eaeaea;border:0;box-shadow:none;box-sizing:border-box;float:right}#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;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: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}#insert-download{padding: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;display:block;font-size:1.1em}#insert-download span.description{display:block}#insert-download input.input{margin:0 0 .25em;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-reports h1 .dlm-reports-actions{float:right}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period,.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher{margin:0 5px;float:left}.dlm-reports h1 .dlm-reports-actions>:last-child{margin-right:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector{position:relative;font-size:14px;padding:0 .5em 0 1em;background:#fff;border:1px solid #ccc;border-radius:3px;user-select:none;cursor:pointer}.dlm-reports h1 .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;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:1.6em;vertical-align:middle;margin-top:-2px}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay{display:block;width:466px;padding:10px;background:#fff;border:1px solid #ccc;position:absolute;top:30px;right:0;z-index:10;overflow:hidden}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date{font-size:70%;margin-right:5px;float:left;z-index:11}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline{border:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .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-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .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-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline td,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline th{padding:0;margin:0;line-height:2em}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline td a,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline th a{text-align:center!important}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_actions{width:70px;padding-left:10px;text-align:center;float:left}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher{display:block;margin-top:1px;padding-top:4px;color:#23282d;text-decoration:none}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher:before{font-family:dashicons!important;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:1.4em}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher.dlm-line:before{content:"\f238"}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher.dlm-bar:before{content:"\f185"}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a{border-color:#ccc!important}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a:first-child{border-bottom-right-radius:0;border-top-right-radius:0;border-right:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a:last-child{border-bottom-left-radius:0;border-top-left-radius:0;border-left:0}.dlm-reports .dlm_reports_loader{position:absolute;width:32px;height:32px;top:50%;left:50%;margin:-16px 0 0 -16px}.dlm-reports .dlm-reports-block-chart{width:100%;height:300px;margin-top:20px;background:#fff;border:1px solid #e5e5e5;overflow:hidden}.dlm-reports .dlm-reports-block-chart .chart-container h6{display:none}.dlm-reports .dlm-reports-block-summary #popular span{line-height:1em}.dlm-reports .dlm-reports-block{position:relative;box-sizing:border-box;width:100%;padding:20px 10px;margin-top:20px;background:#fff;border:1px solid #e5e5e5;overflow:hidden;float:left}.dlm-reports .dlm-reports-block.dlm-reports-block-half{width:49%;margin-right:1%}.dlm-reports .dlm-reports-block.dlm-reports-block-half-right{width:49%;margin-left:1%}.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-reports .dlm-reports-block ul{box-sizing:border-box;width:100%;padding:0;margin:0}.dlm-reports .dlm-reports-block ul li{display:inline-block;width:33%;padding:5px 0}.dlm-reports .dlm-reports-block ul li label,.dlm-reports .dlm-reports-block ul li span{display:block;width:100%;text-align:center}.dlm-reports .dlm-reports-block ul li span{font-size:2.5em;font-weight:700;padding:.5em 0 0}.dlm-reports .dlm-reports-block table{width:100%}.dlm-reports .dlm-reports-block table td,.dlm-reports .dlm-reports-block table th{text-align:center;padding:10px 0;border-bottom:1px solid #e5e5e5}.dlm-reports .dlm-reports-block table td:first-child,.dlm-reports .dlm-reports-block table th:first-child{text-align:left}.dlm-reports .dlm-reports-block table th{padding-bottom:20px}.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;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:680px}.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}.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 h1 a.dlm-reload-button{float:right}.dlm_extensions_wrap .dlm_extensions{padding:15px 0;overflow:hidden}.dlm_extensions_wrap .dlm_extensions div.dlm_extension{cursor:auto!important}.dlm_extensions_wrap .dlm_extensions div.dlm_extension a{color:#444;text-decoration:none}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .dlm_extension_img_wrapper{width:100%;background:#419CCB;text-align:center}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .dlm_extension_img_wrapper img{max-width:100%;margin:0 auto}.dlm_extensions_wrap .dlm_extensions div.dlm_extension h3{padding:0 20px}.dlm_extensions_wrap .dlm_extensions div.dlm_extension p.extension-desc{min-height:85px;padding:0 20px}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .product_footer{padding:0 20px 15px}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .product_footer .loop_price{font-weight:700}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .product_footer .loop_price.sale{color:green}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .product_footer .loop_price.sale strike{color:#444}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .product_footer .loop_more{color:#459ac9;text-decoration:none;font-weight:700;float:right}.dlm_extensions_wrap .dlm_extensions div.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 div.dlm_extension .extension_license div.dlm_license_error{padding:.5em;margin-bottom:15px;background:#ffffe0}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .extension_license div.dlm_license_error a{color:#00f;text-decoration:underline}.dlm_extensions_wrap .dlm_extensions div.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 div.dlm_extension .extension_license p.license-status.active{background:green}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .extension_license input{width:100%;margin:7px 0;padding:7px}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .extension_license a.button-primary{width:100%;margin:5px auto 0;color:#fff;text-align:center}#ui-datepicker-div{display:none}
1
+ .post-type-dlm_download h1 a.dlm-delete-logs{color:#a00}.post-type-dlm_download h1 a.dlm-delete-logs:hover{color:#fff;background:#a00;border-color:#7c0900}#dlm_logs td{padding:7px 7px;vertical-align:middle}#dlm_logs .check-column{width:1.5em;padding:0;vertical-align:middle}#dlm_logs .column-status{width:2em}#dlm_logs td.column-status{font-size:10px;vertical-align:middle;text-align:center}#dlm_logs td.column-status span{color:#fff;font-weight:400;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;height:18px;line-height:18px;width:18px;display:inline-block;background:url(../images/log-status-icons.png) top left no-repeat}#dlm_logs td.column-status .completed{background-color:#6cc644}#dlm_logs td.column-status .failed{background-color:#bd2c00;background-position-y:-18px}#dlm_logs td.column-status .redirected{background-color:#1c769b;background-position-y:-36px}#dlm_logs td.column-user_agent,#dlm_logs td.column-user_ip{font-family:monospace;font-weight:400}#dlm_logs span.dlm-description{font-weight:400}#dlm_logs .column-download,#dlm_logs .column-file,#dlm_logs .column-user,#dlm_logs .column-user_ua{width:16%!important}#dlm_logs .column-date,#dlm_logs .column-user_ip{width:6%!important}.post-type-dlm_download .inline-edit-row .inline-edit-col-dlm .inline-edit-col-dlm-inner{margin-top:10px}.nav-section-wrapper{padding:0;margin:0}.nav-section-wrapper li{display:inline-block;padding:0 0 0 2px;margin:0 2px}.nav-section-wrapper li a{text-decoration:none}.nav-section-wrapper li.active-section a{font-weight:700;color:#000}.nav-section-wrapper li:after{content:"|";padding-left:7px}.nav-section-wrapper li:last-child:after{content:"";padding:0}.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}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-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-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-members_only{width:3.5em}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:"\f338";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-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-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-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-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-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;border-bottom:1px solid #dfdfdf;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-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin:9px 0;border-width:1px;border-style:dashed}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox{background:#ececec;border:1px solid #ececec;margin:9px 0!important}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3{margin:0!important;padding:6px!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:move}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 button{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 strong{font-weight:400;line-height:24px}#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;height:24px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox:hover h3 .handlediv{display: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 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 .dlm-metabox:first-child h3{background:#eaf2fa;background-image:linear-gradient(bottom,#dae6f2 0,#eaf2fa 100%);background-image:-o-linear-gradient(bottom,#dae6f2 0,#eaf2fa 100%);background-image:-moz-linear-gradient(bottom,#dae6f2 0,#eaf2fa 100%);background-image:-webkit-linear-gradient(bottom,#dae6f2 0,#eaf2fa 100%);background-image:-ms-linear-gradient(bottom,#dae6f2 0,#eaf2fa 100%);background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#dae6f2),color-stop(1,#eaf2fa));border-color:#d3deea;color:#21759b}#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_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-information p{overflow:hidden}#download-monitor-information p label{width:100%;font-weight:700;box-sizing:border-box;line-height:28px;float:left}#download-monitor-information p label input{width:65%;padding:5px;font-size:11px;font-weight:400;background:#eaeaea;border:0;box-shadow:none;box-sizing:border-box;float:right}#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}#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-reports h1 .dlm-reports-actions{float:right}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period,.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher{margin:0 5px;float:left}.dlm-reports h1 .dlm-reports-actions>:last-child{margin-right:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector{position:relative;font-size:14px;padding:0 .5em 0 1em;background:#fff;border:1px solid #ccc;border-radius:3px;user-select:none;cursor:pointer}.dlm-reports h1 .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;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:1.6em;vertical-align:middle;margin-top:-2px}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay{display:block;width:466px;padding:10px;background:#fff;border:1px solid #ccc;position:absolute;top:30px;right:0;z-index:10;overflow:hidden}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date{font-size:70%;margin-right:5px;float:left;z-index:11}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline{border:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .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-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .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-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline td,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline th{padding:0;margin:0;line-height:2em}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline td a,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline th a{text-align:center!important}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_actions{width:70px;padding-left:10px;text-align:center;float:left}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher{display:block;margin-top:1px;padding-top:4px;color:#23282d;text-decoration:none}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher:before{font-family:dashicons!important;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:1.4em}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher.dlm-line:before{content:"\f238"}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher.dlm-bar:before{content:"\f185"}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a{border-color:#ccc!important}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a:first-child{border-bottom-right-radius:0;border-top-right-radius:0;border-right:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a:last-child{border-bottom-left-radius:0;border-top-left-radius:0;border-left:0}.dlm-reports .dlm_reports_loader{position:absolute;width:32px;height:32px;top:50%;left:50%;margin:-16px 0 0 -16px}.dlm-reports .dlm-reports-block-chart{width:100%;height:300px;margin-top:20px;background:#fff;border:1px solid #e5e5e5;overflow:hidden}.dlm-reports .dlm-reports-block-chart .chart-container h6{display:none}.dlm-reports .dlm-reports-block-summary #popular span{line-height:1em}.dlm-reports .dlm-reports-block{position:relative;box-sizing:border-box;width:100%;padding:20px 10px;margin-top:20px;background:#fff;border:1px solid #e5e5e5;overflow:hidden;float:left}.dlm-reports .dlm-reports-block.dlm-reports-block-half{width:49%;margin-right:1%}.dlm-reports .dlm-reports-block.dlm-reports-block-half-right{width:49%;margin-left:1%}.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-reports .dlm-reports-block ul{box-sizing:border-box;width:100%;padding:0;margin:0}.dlm-reports .dlm-reports-block ul li{display:inline-block;width:33%;padding:5px 0}.dlm-reports .dlm-reports-block ul li label,.dlm-reports .dlm-reports-block ul li span{display:block;width:100%;text-align:center}.dlm-reports .dlm-reports-block ul li span{font-size:2.5em;font-weight:700;padding:.5em 0 0}.dlm-reports .dlm-reports-block table{width:100%}.dlm-reports .dlm-reports-block table td,.dlm-reports .dlm-reports-block table th{text-align:center;padding:10px 0;border-bottom:1px solid #e5e5e5}.dlm-reports .dlm-reports-block table td:first-child,.dlm-reports .dlm-reports-block table th:first-child{text-align:left}.dlm-reports .dlm-reports-block table th{padding-bottom:20px}.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:680px}.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 h1 a.dlm-reload-button{float:right}.dlm_extensions_wrap .dlm_extensions{padding:15px 0;overflow:hidden}.dlm_extensions_wrap .dlm_extensions div.dlm_extension{cursor:auto!important}.dlm_extensions_wrap .dlm_extensions div.dlm_extension a{color:#444;text-decoration:none}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .dlm_extension_img_wrapper{width:100%;background:#419ccb;text-align:center}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .dlm_extension_img_wrapper img{max-width:100%;margin:0 auto}.dlm_extensions_wrap .dlm_extensions div.dlm_extension h3{padding:0 20px}.dlm_extensions_wrap .dlm_extensions div.dlm_extension p.extension-desc{min-height:85px;padding:0 20px}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .product_footer{padding:0 20px 15px}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .product_footer .loop_price{font-weight:700}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .product_footer .loop_price.sale{color:green}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .product_footer .loop_price.sale strike{color:#444}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .product_footer .loop_more{color:#459ac9;text-decoration:none;font-weight:700;float:right}.dlm_extensions_wrap .dlm_extensions div.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 div.dlm_extension .extension_license div.dlm_license_error{padding:.5em;margin-bottom:15px;background:#ffffe0}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .extension_license div.dlm_license_error a{color:#00f;text-decoration:underline}.dlm_extensions_wrap .dlm_extensions div.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 div.dlm_extension .extension_license p.license-status.active{background:green}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .extension_license input{width:100%;margin:7px 0;padding:7px}.dlm_extensions_wrap .dlm_extensions div.dlm_extension .extension_license a.button-primary{width:100%;margin:5px auto 0;color:#fff;text-align:center}#ui-datepicker-div{display:none}
assets/css/admin.less CHANGED
@@ -942,6 +942,50 @@ table.wp-list-table {
942
 
943
  }
944
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
945
  /** Orders Overview */
946
  .dlm-order-overview {
947
 
@@ -959,6 +1003,7 @@ table.wp-list-table {
959
 
960
  }
961
 
 
962
  .dlm-order-details {
963
 
964
  max-width: 1250px;
@@ -1138,6 +1183,7 @@ table.wp-list-table {
1138
  }
1139
  }
1140
 
 
1141
  .dlm-onboarding {
1142
 
1143
  .dlm-onboarding-section {
942
 
943
  }
944
 
945
+ /** Products overview page */
946
+ .post-type-dlm_product {
947
+ table.wp-list-table {
948
+ .column-title {
949
+ width: 65% !important;
950
+ }
951
+ }
952
+ }
953
+
954
+ /** Products detail page */
955
+ .dlm_mb_shop_product_information {
956
+ .dlm_shop_field_row {
957
+ width: 100%;
958
+ overflow: hidden;
959
+ label.dlm_shop_field_label {
960
+ display: inline-block;
961
+ width: 20%;
962
+ height: 100%;
963
+ line-height: 2.2em;
964
+ float: left;
965
+ }
966
+ span.dlm_shop_field_input {
967
+ display: inline-block;
968
+ width: 50%;
969
+ float: left;
970
+
971
+ .dlm_shop_input {
972
+ width: 100%;
973
+ padding: 5px 7px;
974
+ }
975
+
976
+ .select2-selection--multiple {
977
+ border: 1px solid #dddddd;
978
+ }
979
+ .select2-search, .select2-selection__choice {
980
+ margin-bottom: 0;
981
+ }
982
+ .select2-search__field {
983
+ padding-top: 3px;
984
+ }
985
+ }
986
+ }
987
+ }
988
+
989
  /** Orders Overview */
990
  .dlm-order-overview {
991
 
1003
 
1004
  }
1005
 
1006
+ /** Order details */
1007
  .dlm-order-details {
1008
 
1009
  max-width: 1250px;
1183
  }
1184
  }
1185
 
1186
+ /** Onboarding */
1187
  .dlm-onboarding {
1188
 
1189
  .dlm-onboarding-section {
assets/css/frontend.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;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}
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}
assets/css/preview.css CHANGED
@@ -1 +1 @@
1
- body,html{padding:0;margin:0;overflow:hidden!important}p,table,td,tr{padding:0!important;margin:0!important}.dlmPreviewContainer{overflow:hidden}
1
+ body,html{padding:0;margin:0;overflow:hidden!important}table,td,tr{padding:0!important;margin:0!important}p{padding:0!important;margin:0!important}.dlmPreviewContainer{overflow:hidden}
assets/js/blockui.min.js CHANGED
@@ -1,14 +1 @@
1
- /*!
2
- * jQuery blockUI plugin
3
- * Version 2.61.0-2013.06.06
4
- * @requires jQuery v1.7 or later
5
- *
6
- * Examples at: http://malsup.com/jquery/block/
7
- * Copyright (c) 2007-2013 M. Alsup
8
- * Dual licensed under the MIT and GPL licenses:
9
- * http://www.opensource.org/licenses/mit-license.php
10
- * http://www.gnu.org/licenses/gpl.html
11
- *
12
- * Thanks to Amir-Hossein Sobhi for some excellent contributions!
13
- */
14
- !function(){"use strict";function a(a){function b(b,d){var f,p,q=b==window,r=d&&void 0!==d.message?d.message:void 0;if(d=a.extend({},a.blockUI.defaults,d||{}),!d.ignoreIfBlocked||!a(b).data("blockUI.isBlocked")){if(d.overlayCSS=a.extend({},a.blockUI.defaults.overlayCSS,d.overlayCSS||{}),f=a.extend({},a.blockUI.defaults.css,d.css||{}),d.onOverlayClick&&(d.overlayCSS.cursor="pointer"),p=a.extend({},a.blockUI.defaults.themedCSS,d.themedCSS||{}),r=void 0===r?d.message:r,q&&n&&c(window,{fadeOut:0}),r&&"string"!=typeof r&&(r.parentNode||r.jquery)){var s=r.jquery?r[0]:r,t={};a(b).data("blockUI.history",t),t.el=s,t.parent=s.parentNode,t.display=s.style.display,t.position=s.style.position,t.parent&&t.parent.removeChild(s)}a(b).data("blockUI.onUnblock",d.onUnblock);var u,v,w,x,y=d.baseZ;u=a(k||d.forceIframe?'<iframe class="blockUI" style="z-index:'+y+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+d.iframeSrc+'"></iframe>':'<div class="blockUI" style="display:none"></div>'),v=a(d.theme?'<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+y+++';display:none"></div>':'<div class="blockUI blockOverlay" style="z-index:'+y+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),d.theme&&q?(x='<div class="blockUI '+d.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(y+10)+';display:none;position:fixed">',d.title&&(x+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(d.title||"&nbsp;")+"</div>"),x+='<div class="ui-widget-content ui-dialog-content"></div>',x+="</div>"):d.theme?(x='<div class="blockUI '+d.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(y+10)+';display:none;position:absolute">',d.title&&(x+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(d.title||"&nbsp;")+"</div>"),x+='<div class="ui-widget-content ui-dialog-content"></div>',x+="</div>"):x=q?'<div class="blockUI '+d.blockMsgClass+' blockPage" style="z-index:'+(y+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+d.blockMsgClass+' blockElement" style="z-index:'+(y+10)+';display:none;position:absolute"></div>',w=a(x),r&&(d.theme?(w.css(p),w.addClass("ui-widget-content")):w.css(f)),d.theme||v.css(d.overlayCSS),v.css("position",q?"fixed":"absolute"),(k||d.forceIframe)&&u.css("opacity",0);var z=[u,v,w],A=a(q?"body":b);a.each(z,function(){this.appendTo(A)}),d.theme&&d.draggable&&a.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var B=m&&(!a.support.boxModel||a("object,embed",q?null:b).length>0);if(l||B){if(q&&d.allowBodyStretch&&a.support.boxModel&&a("html,body").css("height","100%"),(l||!a.support.boxModel)&&!q)var C=i(b,"borderTopWidth"),D=i(b,"borderLeftWidth"),E=C?"(0 - "+C+")":0,F=D?"(0 - "+D+")":0;a.each(z,function(a,b){var c=b[0].style;if(c.position="absolute",a<2)q?c.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+d.quirksmodeOffsetHack+') + "px"'):c.setExpression("height",'this.parentNode.offsetHeight + "px"'),q?c.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):c.setExpression("width",'this.parentNode.offsetWidth + "px"'),F&&c.setExpression("left",F),E&&c.setExpression("top",E);else if(d.centerY)q&&c.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),c.marginTop=0;else if(!d.centerY&&q){var e=d.css&&d.css.top?parseInt(d.css.top,10):0,f="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+e+') + "px"';c.setExpression("top",f)}})}if(r&&(d.theme?w.find(".ui-widget-content").append(r):w.append(r),(r.jquery||r.nodeType)&&a(r).show()),(k||d.forceIframe)&&d.showOverlay&&u.show(),d.fadeIn){var G=d.onBlock?d.onBlock:j,H=d.showOverlay&&!r?G:j,I=r?G:j;d.showOverlay&&v._fadeIn(d.fadeIn,H),r&&w._fadeIn(d.fadeIn,I)}else d.showOverlay&&v.show(),r&&w.show(),d.onBlock&&d.onBlock();if(e(1,b,d),q?(n=w[0],o=a(d.focusableElements,n),d.focusInput&&setTimeout(g,20)):h(w[0],d.centerX,d.centerY),d.timeout){var J=setTimeout(function(){q?a.unblockUI(d):a(b).unblock(d)},d.timeout);a(b).data("blockUI.timeout",J)}}}function c(b,c){var f,g=b==window,h=a(b),i=h.data("blockUI.history"),j=h.data("blockUI.timeout");j&&(clearTimeout(j),h.removeData("blockUI.timeout")),c=a.extend({},a.blockUI.defaults,c||{}),e(0,b,c),null===c.onUnblock&&(c.onUnblock=h.data("blockUI.onUnblock"),h.removeData("blockUI.onUnblock"));var k;k=g?a("body").children().filter(".blockUI").add("body > .blockUI"):h.find(">.blockUI"),c.cursorReset&&(k.length>1&&(k[1].style.cursor=c.cursorReset),k.length>2&&(k[2].style.cursor=c.cursorReset)),g&&(n=o=null),c.fadeOut?(f=k.length,k.fadeOut(c.fadeOut,function(){0==--f&&d(k,i,c,b)})):d(k,i,c,b)}function d(b,c,d,e){var f=a(e);b.each(function(a,b){this.parentNode&&this.parentNode.removeChild(this)}),c&&c.el&&(c.el.style.display=c.display,c.el.style.position=c.position,c.parent&&c.parent.appendChild(c.el),f.removeData("blockUI.history")),f.data("blockUI.static")&&f.css("position","static"),"function"==typeof d.onUnblock&&d.onUnblock(e,d);var g=a(document.body),h=g.width(),i=g[0].style.width;g.width(h-1).width(h),g[0].style.width=i}function e(b,c,d){var e=c==window,g=a(c);if((b||(!e||n)&&(e||g.data("blockUI.isBlocked")))&&(g.data("blockUI.isBlocked",b),e&&d.bindEvents&&(!b||d.showOverlay))){var h="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";b?a(document).bind(h,d,f):a(document).unbind(h,f)}}function f(b){if(b.keyCode&&9==b.keyCode&&n&&b.data.constrainTabKey){var c=o,d=!b.shiftKey&&b.target===c[c.length-1],e=b.shiftKey&&b.target===c[0];if(d||e)return setTimeout(function(){g(e)},10),!1}var f=b.data,h=a(b.target);return h.hasClass("blockOverlay")&&f.onOverlayClick&&f.onOverlayClick(),h.parents("div."+f.blockMsgClass).length>0||0===h.parents().children().filter("div.blockUI").length}function g(a){if(o){var b=o[!0===a?o.length-1:0];b&&b.focus()}}function h(a,b,c){var d=a.parentNode,e=a.style,f=(d.offsetWidth-a.offsetWidth)/2-i(d,"borderLeftWidth"),g=(d.offsetHeight-a.offsetHeight)/2-i(d,"borderTopWidth");b&&(e.left=f>0?f+"px":"0"),c&&(e.top=g>0?g+"px":"0")}function i(b,c){return parseInt(a.css(b,c),10)||0}a.fn._fadeIn=a.fn.fadeIn;var j=a.noop||function(){},k=/MSIE/.test(navigator.userAgent),l=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),m=(document.documentMode,a.isFunction(document.createElement("div").style.setExpression));a.blockUI=function(a){b(window,a)},a.unblockUI=function(a){c(window,a)},a.growlUI=function(b,c,d,e){var f=a('<div class="growlUI"></div>');b&&f.append("<h1>"+b+"</h1>"),c&&f.append("<h2>"+c+"</h2>"),void 0===d&&(d=3e3);var g=function(b){b=b||{},a.blockUI({message:f,fadeIn:void 0!==b.fadeIn?b.fadeIn:700,fadeOut:void 0!==b.fadeOut?b.fadeOut:1e3,timeout:void 0!==b.timeout?b.timeout:d,centerY:!1,showOverlay:!1,onUnblock:e,css:a.blockUI.defaults.growlCSS})};g();f.css("opacity");f.mouseover(function(){g({fadeIn:0,timeout:3e4});var b=a(".blockMsg");b.stop(),b.fadeTo(300,1)}).mouseout(function(){a(".blockMsg").fadeOut(1e3)})},a.fn.block=function(c){if(this[0]===window)return a.blockUI(c),this;var d=a.extend({},a.blockUI.defaults,c||{});return this.each(function(){var b=a(this);d.ignoreIfBlocked&&b.data("blockUI.isBlocked")||b.unblock({fadeOut:0})}),this.each(function(){"static"==a.css(this,"position")&&(this.style.position="relative",a(this).data("blockUI.static",!0)),this.style.zoom=1,b(this,c)})},a.fn.unblock=function(b){return this[0]===window?(a.unblockUI(b),this):this.each(function(){c(this,b)})},a.blockUI.version=2.6,a.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var n=null,o=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],a):a(jQuery)}();
1
+ !function(){"use strict";function e(x){x.fn._fadeIn=x.fn.fadeIn;var C=x.noop||function(){},S=/MSIE/.test(navigator.userAgent),O=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),E=(document.documentMode,x.isFunction(document.createElement("div").style.setExpression));x.blockUI=function(e){t(window,e)},x.unblockUI=function(e){B(window,e)},x.growlUI=function(e,o,t,i){var n=x('<div class="growlUI"></div>');e&&n.append("<h1>"+e+"</h1>"),o&&n.append("<h2>"+o+"</h2>"),void 0===t&&(t=3e3);var s=function(e){e=e||{},x.blockUI({message:n,fadeIn:void 0!==e.fadeIn?e.fadeIn:700,fadeOut:void 0!==e.fadeOut?e.fadeOut:1e3,timeout:void 0!==e.timeout?e.timeout:t,centerY:!1,showOverlay:!1,onUnblock:i,css:x.blockUI.defaults.growlCSS})};s();n.css("opacity");n.mouseover(function(){s({fadeIn:0,timeout:3e4});var e=x(".blockMsg");e.stop(),e.fadeTo(300,1)}).mouseout(function(){x(".blockMsg").fadeOut(1e3)})},x.fn.block=function(e){if(this[0]===window)return x.blockUI(e),this;var o=x.extend({},x.blockUI.defaults,e||{});return this.each(function(){var e=x(this);o.ignoreIfBlocked&&e.data("blockUI.isBlocked")||e.unblock({fadeOut:0})}),this.each(function(){"static"==x.css(this,"position")&&(this.style.position="relative",x(this).data("blockUI.static",!0)),this.style.zoom=1,t(this,e)})},x.fn.unblock=function(e){return this[0]===window?(x.unblockUI(e),this):this.each(function(){B(this,e)})},x.blockUI.version=2.6,x.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var T=null,M=[];function t(e,n){var o,t,s=e==window,i=n&&void 0!==n.message?n.message:void 0;if(!(n=x.extend({},x.blockUI.defaults,n||{})).ignoreIfBlocked||!x(e).data("blockUI.isBlocked")){if(n.overlayCSS=x.extend({},x.blockUI.defaults.overlayCSS,n.overlayCSS||{}),o=x.extend({},x.blockUI.defaults.css,n.css||{}),n.onOverlayClick&&(n.overlayCSS.cursor="pointer"),t=x.extend({},x.blockUI.defaults.themedCSS,n.themedCSS||{}),i=void 0===i?n.message:i,s&&T&&B(window,{fadeOut:0}),i&&"string"!=typeof i&&(i.parentNode||i.jquery)){var l=i.jquery?i[0]:i,a={};x(e).data("blockUI.history",a),a.el=l,a.parent=l.parentNode,a.display=l.style.display,a.position=l.style.position,a.parent&&a.parent.removeChild(l)}x(e).data("blockUI.onUnblock",n.onUnblock);var d,c,r,u,f=n.baseZ;d=S||n.forceIframe?x('<iframe class="blockUI" style="z-index:'+f+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+n.iframeSrc+'"></iframe>'):x('<div class="blockUI" style="display:none"></div>'),c=n.theme?x('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+f+++';display:none"></div>'):x('<div class="blockUI blockOverlay" style="z-index:'+f+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),n.theme&&s?(u='<div class="blockUI '+n.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(f+10)+';display:none;position:fixed">',n.title&&(u+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(n.title||"&nbsp;")+"</div>"),u+='<div class="ui-widget-content ui-dialog-content"></div>',u+="</div>"):n.theme?(u='<div class="blockUI '+n.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(f+10)+';display:none;position:absolute">',n.title&&(u+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(n.title||"&nbsp;")+"</div>"),u+='<div class="ui-widget-content ui-dialog-content"></div>',u+="</div>"):u=s?'<div class="blockUI '+n.blockMsgClass+' blockPage" style="z-index:'+(f+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+n.blockMsgClass+' blockElement" style="z-index:'+(f+10)+';display:none;position:absolute"></div>',r=x(u),i&&(n.theme?(r.css(t),r.addClass("ui-widget-content")):r.css(o)),n.theme||c.css(n.overlayCSS),c.css("position",s?"fixed":"absolute"),(S||n.forceIframe)&&d.css("opacity",0);var b=[d,c,r],p=x(s?"body":e);x.each(b,function(){this.appendTo(p)}),n.theme&&n.draggable&&x.fn.draggable&&r.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var h=E&&(!x.support.boxModel||0<x("object,embed",s?null:e).length);if(O||h){if(s&&n.allowBodyStretch&&x.support.boxModel&&x("html,body").css("height","100%"),(O||!x.support.boxModel)&&!s)var k=z(e,"borderTopWidth"),v=z(e,"borderLeftWidth"),m=k?"(0 - "+k+")":0,y=v?"(0 - "+v+")":0;x.each(b,function(e,o){var t=o[0].style;if(t.position="absolute",e<2)s?t.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+n.quirksmodeOffsetHack+') + "px"'):t.setExpression("height",'this.parentNode.offsetHeight + "px"'),s?t.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):t.setExpression("width",'this.parentNode.offsetWidth + "px"'),y&&t.setExpression("left",y),m&&t.setExpression("top",m);else if(n.centerY)s&&t.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),t.marginTop=0;else if(!n.centerY&&s){var i="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(n.css&&n.css.top?parseInt(n.css.top,10):0)+') + "px"';t.setExpression("top",i)}})}if(i&&(n.theme?r.find(".ui-widget-content").append(i):r.append(i),(i.jquery||i.nodeType)&&x(i).show()),(S||n.forceIframe)&&n.showOverlay&&d.show(),n.fadeIn){var g=n.onBlock?n.onBlock:C,I=n.showOverlay&&!i?g:C,w=i?g:C;n.showOverlay&&c._fadeIn(n.fadeIn,I),i&&r._fadeIn(n.fadeIn,w)}else n.showOverlay&&c.show(),i&&r.show(),n.onBlock&&n.onBlock();if(j(1,e,n),s?(T=r[0],M=x(n.focusableElements,T),n.focusInput&&setTimeout(H,20)):function(e,o,t){var i=e.parentNode,n=e.style,s=(i.offsetWidth-e.offsetWidth)/2-z(i,"borderLeftWidth"),l=(i.offsetHeight-e.offsetHeight)/2-z(i,"borderTopWidth");o&&(n.left=0<s?s+"px":"0");t&&(n.top=0<l?l+"px":"0")}(r[0],n.centerX,n.centerY),n.timeout){var U=setTimeout(function(){s?x.unblockUI(n):x(e).unblock(n)},n.timeout);x(e).data("blockUI.timeout",U)}}}function B(e,o){var t,i,n=e==window,s=x(e),l=s.data("blockUI.history"),a=s.data("blockUI.timeout");a&&(clearTimeout(a),s.removeData("blockUI.timeout")),o=x.extend({},x.blockUI.defaults,o||{}),j(0,e,o),null===o.onUnblock&&(o.onUnblock=s.data("blockUI.onUnblock"),s.removeData("blockUI.onUnblock")),i=n?x("body").children().filter(".blockUI").add("body > .blockUI"):s.find(">.blockUI"),o.cursorReset&&(1<i.length&&(i[1].style.cursor=o.cursorReset),2<i.length&&(i[2].style.cursor=o.cursorReset)),n&&(T=M=null),o.fadeOut?(t=i.length,i.fadeOut(o.fadeOut,function(){0==--t&&d(i,l,o,e)})):d(i,l,o,e)}function d(e,o,t,i){var n=x(i);e.each(function(e,o){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.parent&&o.parent.appendChild(o.el),n.removeData("blockUI.history")),n.data("blockUI.static")&&n.css("position","static"),"function"==typeof t.onUnblock&&t.onUnblock(i,t);var s=x(document.body),l=s.width(),a=s[0].style.width;s.width(l-1).width(l),s[0].style.width=a}function j(e,o,t){var i=o==window,n=x(o);if((e||(!i||T)&&(i||n.data("blockUI.isBlocked")))&&(n.data("blockUI.isBlocked",e),i&&t.bindEvents&&(!e||t.showOverlay))){var s="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";e?x(document).bind(s,t,l):x(document).unbind(s,l)}}function l(e){if(e.keyCode&&9==e.keyCode&&T&&e.data.constrainTabKey){var o=M,t=!e.shiftKey&&e.target===o[o.length-1],i=e.shiftKey&&e.target===o[0];if(t||i)return setTimeout(function(){H(i)},10),!1}var n=e.data,s=x(e.target);return s.hasClass("blockOverlay")&&n.onOverlayClick&&n.onOverlayClick(),0<s.parents("div."+n.blockMsgClass).length||0===s.parents().children().filter("div.blockUI").length}function H(e){if(M){var o=M[!0===e?M.length-1:0];o&&o.focus()}}function z(e,o){return parseInt(x.css(e,o),10)||0}}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}();
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/edit-download.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){function b(){jQuery(".downloadable_files .downloadable_file").each(function(a,b){jQuery(".file_menu_order",b).val(parseInt(jQuery(b).index(".downloadable_files .downloadable_file")))})}jQuery(".expand_all").click(function(){return jQuery(this).closest(".dlm-metaboxes-wrapper").find(".dlm-metabox table").show(),!1}),jQuery(".close_all").click(function(){return jQuery(this).closest(".dlm-metaboxes-wrapper").find(".dlm-metabox table").hide(),!1}),jQuery(".dlm-metaboxes-wrapper").on("click",".dlm-metabox h3",function(a){jQuery(a.target).filter(":input, option").length||jQuery(this).next(".dlm-metabox-content").toggle()}),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(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,c){c.item.removeAttr("style"),b()}}),jQuery(".download_monitor_files").on("click","a.add_file",function(){jQuery(".download_monitor_files").block({message:null,overlayCSS:{background:"#fff url("+a("#dlm-plugin-url").val()+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var c=jQuery(".downloadable_files .downloadable_file").size(),d={action:"download_monitor_add_file",post_id:a("#dlm-post-id").val(),size:c,security:a("#dlm-ajax-nonce-add-file").val()};return jQuery.post(ajaxurl,d,function(a){jQuery(".downloadable_files").prepend(a),b(),jQuery(".download_monitor_files").unblock(),jQuery(".date-picker-field").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0})}),!1}),jQuery(".download_monitor_files").on("click","button.remove_file",function(b){if(b.preventDefault(),confirm(dlm_ed_strings.confirm_delete)){var c=jQuery(this).closest(".downloadable_file"),d=c.attr("data-file");if(d>0){jQuery(c).block({message:null,overlayCSS:{background:"#fff url("+a("#dlm-plugin-url").val()+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var e={action:"download_monitor_remove_file",file_id:d,download_id:a("#dlm-post-id").val(),security:a("#dlm-ajax-nonce-remove-file").val()};jQuery.post(ajaxurl,e,function(a){jQuery(c).fadeOut("300").remove()})}else jQuery(c).fadeOut("300").remove()}return!1}),jQuery(".download_monitor_files").on("click","a.dlm_browse_for_file",function(b){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="+a("#dlm-post-id").val()+"&amp;type=downloadable_file_browser&amp;from=wpdlm01&amp;TB_iframe=true"),!1}),window.send_to_browse_file_url=function(a){a&&(old=jQuery.trim(jQuery(downloadable_files_field).val()),old&&(old+="\n"),jQuery(downloadable_files_field).val(old+a)),tb_remove(),window.send_to_editor=window.send_to_editor_default};var c;jQuery(document).on("click",".dlm_upload_file",function(b){var d=a(this),e=d.parent().parent().find(".downloadable_file_urls"),f=e.val();b.preventDefault(),c&&c.close();var g=[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:d.data("choose"),priority:20,filterable:"uploaded"})];c=wp.media.frames.downloadable_file=wp.media({title:d.data("choose"),library:{type:""},button:{text:d.data("update")},multiple:!0,states:g}),c.on("select",function(){c.state().get("selection").map(function(a){a=a.toJSON(),a.url&&(f=f?f+"\n"+a.url:a.url)}),e.val(f)}),c.on("ready",function(){c.uploader.options.uploader.params={type:"dlm_download"}}),c.open()})});
1
+ jQuery(function(d){function l(){jQuery(".downloadable_files .downloadable_file").each(function(e,o){jQuery(".file_menu_order",o).val(parseInt(jQuery(o).index(".downloadable_files .downloadable_file")))})}var r;jQuery(".expand_all").click(function(){return jQuery(this).closest(".dlm-metaboxes-wrapper").find(".dlm-metabox table").show(),!1}),jQuery(".close_all").click(function(){return jQuery(this).closest(".dlm-metaboxes-wrapper").find(".dlm-metabox table").hide(),!1}),jQuery(".dlm-metaboxes-wrapper").on("click",".dlm-metabox h3",function(e){jQuery(e.target).filter(":input, option").length||jQuery(this).next(".dlm-metabox-content").toggle()}),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,o){o.item.css("background-color","#f6f6f6")},stop:function(e,o){o.item.removeAttr("style"),l()}}),jQuery(".download_monitor_files").on("click","a.add_file",function(){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").size(),o={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,o,function(e){jQuery(".downloadable_files").prepend(e),l(),jQuery(".download_monitor_files").unblock(),jQuery(".date-picker-field").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0})}),!1}),jQuery(".download_monitor_files").on("click","button.remove_file",function(e){if(e.preventDefault(),confirm(dlm_ed_strings.confirm_delete)){var o=jQuery(this).closest(".downloadable_file"),l=o.attr("data-file");if(0<l){jQuery(o).block({message:null,overlayCSS:{background:"#fff url("+d("#dlm-plugin-url").val()+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var a={action:"download_monitor_remove_file",file_id:l,download_id:d("#dlm-post-id").val(),security:d("#dlm-ajax-nonce-remove-file").val()};jQuery.post(ajaxurl,a,function(e){jQuery(o).fadeOut("300").remove()})}else jQuery(o).fadeOut("300").remove()}return!1}),jQuery(".download_monitor_files").on("click","a.dlm_browse_for_file",function(e){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"),!1}),window.send_to_browse_file_url=function(e){e&&(old=jQuery.trim(jQuery(downloadable_files_field).val()),old&&(old+="\n"),jQuery(downloadable_files_field).val(old+e)),tb_remove(),window.send_to_editor=window.send_to_editor_default},jQuery(document).on("click",".dlm_upload_file",function(e){var o=d(this),l=o.parent().parent().find(".downloadable_file_urls"),a=l.val();e.preventDefault(),r&&r.close();var t=[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:o.data("choose"),priority:20,filterable:"uploaded"})];(r=wp.media.frames.downloadable_file=wp.media({title:o.data("choose"),library:{type:""},button:{text:o.data("update")},multiple:!0,states:t})).on("select",function(){r.state().get("selection").map(function(e){(e=e.toJSON()).url&&(a=a?a+"\n"+e.url:e.url)}),l.val(a)}),r.on("ready",function(){r.uploader.options.uploader.params={type:"dlm_download"}}),r.open()})});
assets/js/edit-product.min.js ADDED
File without changes
assets/js/extensions.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){a.each(a(".extension_license a"),function(b,c){a(c).click(function(){var b=a(c).closest(".extension_license"),d="inactive"==a(b).find("#status").val()?"activate":"deactivate";a(b).find(".dlm_license_error").remove(),a.post(ajaxurl,{action:"dlm_extension",nonce:a("#dlm-ajax-nonce").val(),product_id:a(b).find("#product_id").val(),key:a(b).find("#key").val(),email:a(b).find("#email").val(),extension_action:d},function(c){"failed"==c.result?a(b).prepend(a("<div>").addClass("dlm_license_error").html(c.message)):"activate"==d?(a(b).find(".license-status").addClass("active").html("ACTIVE"),a(b).find(".button").html("Deactivate"),a(b).find("#status").val("active"),a(b).find("#key").attr("disabled",!0),a(b).find("#email").attr("disabled",!0)):(a(b).find(".license-status").removeClass("active").html("INACTIVE"),a(b).find(".button").html("Activate"),a(b).find("#status").val("inactive"),a(b).find("#key").attr("disabled",!1),a(b).find("#email").attr("disabled",!1))})})})});
1
+ jQuery(function(n){n.each(n(".extension_license a"),function(e,a){n(a).click(function(){var t=n(a).closest(".extension_license"),i="inactive"==n(t).find("#status").val()?"activate":"deactivate";n(t).find(".dlm_license_error").remove(),n.post(ajaxurl,{action:"dlm_extension",nonce:n("#dlm-ajax-nonce").val(),product_id:n(t).find("#product_id").val(),key:n(t).find("#key").val(),email:n(t).find("#email").val(),extension_action:i},function(e){"failed"==e.result?n(t).prepend(n("<div>").addClass("dlm_license_error").html(e.message)):"activate"==i?(n(t).find(".license-status").addClass("active").html("ACTIVE"),n(t).find(".button").html("Deactivate"),n(t).find("#status").val("active"),n(t).find("#key").attr("disabled",!0),n(t).find("#email").attr("disabled",!0)):(n(t).find(".license-status").removeClass("active").html("INACTIVE"),n(t).find(".button").html("Activate"),n(t).find("#status").val("inactive"),n(t).find("#key").attr("disabled",!1),n(t).find("#email").attr("disabled",!1))})})})});
assets/js/insert-download.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){jQuery("body").on("click","a.dlm_insert_download",function(){return tb_show(dlm_id_strings.insert_download,"media-upload.php?type=add_download&amp;from=wpdlm01&amp;TB_iframe=true&amp;height=200"),!1})});
1
+ jQuery(function(d){jQuery("body").on("click","a.dlm_insert_download",function(){return tb_show(dlm_id_strings.insert_download,"media-upload.php?type=add_download&amp;from=wpdlm01&amp;TB_iframe=true&amp;height=200"),!1})});
assets/js/notices.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){a(".dlm-notice.is-dismissible").on("click",".notice-dismiss",function(b){var c=a(this).closest(".dlm-notice"),d=c.attr("id"),e=c.attr("data-nonce");a.post(ajaxurl,{action:"dlm_dismiss_notice",nonce:e,notice:d},function(a){})})});
1
+ jQuery(function(o){o(".dlm-notice.is-dismissible").on("click",".notice-dismiss",function(i){var n=o(this).closest(".dlm-notice"),t=n.attr("id"),c=n.attr("data-nonce");o.post(ajaxurl,{action:"dlm_dismiss_notice",nonce:c,notice:t},function(i){})})});
assets/js/onboarding.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){a.each(a(".dlm-create-page"),function(a,b){new DLM_Onboarding_CP(b)})});var DLM_Onboarding_CP=function(a){this.el=a,this.page=jQuery(a).data("page"),this.allowAction=!0,this.setup()};DLM_Onboarding_CP.prototype.setup=function(){var a=this;jQuery(this.el).click(function(){a.process()})},DLM_Onboarding_CP.prototype.process=function(){if(!this.allowAction)return!1;this.allowAction=!1;var a=this;jQuery(a.el).html(dlm_onboarding.lbl_creating),jQuery.get(dlm_onboarding.ajax_url_create_page,{page:this.page},function(b){"success"===b.result?(jQuery(a.el).html(dlm_onboarding.lbl_created),jQuery(a.el).removeClass("dlm-create-page").addClass("dlm-page-exists")):(jQuery(a.el).html(dlm_onboarding.lbl_create_page),void 0!==b.error&&alert(b.error),a.allowAction=!0),console.log(b)})};
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)})};
assets/js/overview-download.min.js CHANGED
@@ -1 +1 @@
1
- !function(a){var b=inlineEditPost.edit;inlineEditPost.edit=function(c){b.apply(this,arguments);var d=0;if("object"==typeof c&&(d=parseInt(this.getId(c))),d>0){var e=a("#edit-"+d),f=a("#post-"+d),g="Yes"==a(".column-featured",f).text(),h="Yes"==a(".column-members_only",f).text(),i="Yes"==a(".column-redirect_only",f).text();a(':input[name="_featured"]',e).prop("checked",g),a(':input[name="_members_only"]',e).prop("checked",h),a(':input[name="_redirect_only"]',e).prop("checked",i)}}}(jQuery);
1
+ !function(p){var d=inlineEditPost.edit;inlineEditPost.edit=function(e){d.apply(this,arguments);var t=0;if("object"==typeof e&&(t=parseInt(this.getId(e))),0<t){var n=p("#edit-"+t),i=p("#post-"+t),o="Yes"==p(".column-featured",i).text(),r="Yes"==p(".column-members_only",i).text(),c="Yes"==p(".column-redirect_only",i).text();p(':input[name="_featured"]',n).prop("checked",o),p(':input[name="_members_only"]',n).prop("checked",r),p(':input[name="_redirect_only"]',n).prop("checked",c)}}}(jQuery);
assets/js/reports/charts-date-range-selector.min.js CHANGED
@@ -1 +1 @@
1
- jQuery.fn.extend({dlm_reports_date_range:function(a,b,c){return new DLM_Reports_Date_Range_Selector(this,a,b,c),this}});var DLM_Reports_Date_Range_Selector=function(a,b,c,d){this.container=a,this.startDate=new Date(b),this.endDate=new Date(c),this.url=d,this.el=null,this.opened=!1,this.startDateInput=null,this.endDateInput=null,this.setup=function(){var a=this;this.container.click(function(){return a.toggleDisplay(),!1})},this.setup()};DLM_Reports_Date_Range_Selector.prototype.toggleDisplay=function(){this.opened?this.hide():this.display()},DLM_Reports_Date_Range_Selector.prototype.display=function(){this.opened||(this.opened=!0,this.el=this.createElement(),this.container.append(this.el))},DLM_Reports_Date_Range_Selector.prototype.hide=function(){this.opened=!1,this.el.remove()},DLM_Reports_Date_Range_Selector.prototype.apply=function(){var a=new Date(this.startDateInput.val()+"T00:00:00"),b=new Date(this.endDateInput.val()+"T00:00:00"),c=a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate(),d=b.getFullYear()+"-"+(b.getMonth()+1)+"-"+b.getDate();this.hide(),window.location.replace(this.url+"&date_from="+c+"&date_to="+d)},DLM_Reports_Date_Range_Selector.prototype.createElement=function(){var a=this,b=jQuery("<div>").addClass("dlm_rdrs_overlay"),c=jQuery("<div>").addClass("dlm_rdrs_date").attr("id","dlm_rdrs_date_start"),d=jQuery("<div>").addClass("dlm_rdrs_date").attr("id","dlm_rdrs_date_end");this.startDateInput=jQuery("<input>").attr("type","hidden"),this.endDateInput=jQuery("<input>").attr("type","hidden");var e=jQuery("<div>").addClass("dlm_rdrs_actions"),f=jQuery("<a>").addClass("button").html("Apply").click(function(){return a.apply(),!1});return e.append(f),b.append(c).append(d).append(e).append(this.startDateInput).append(this.endDateInput),c.datepicker({inline:!0,altField:this.startDateInput,dateFormat:"yy-mm-dd",defaultDate:this.startDate}),d.datepicker({inline:!0,altField:this.endDateInput,dateFormat:"yy-mm-dd",defaultDate:this.endDate}),b.click(function(){return!1}),b};
1
+ jQuery.fn.extend({dlm_reports_date_range:function(t,e,a){return new DLM_Reports_Date_Range_Selector(this,t,e,a),this}});var DLM_Reports_Date_Range_Selector=function(t,e,a,n){this.container=t,this.startDate=new Date(e),this.endDate=new Date(a),this.url=n,this.el=null,this.opened=!1,this.startDateInput=null,this.endDateInput=null,this.setup=function(){var t=this;this.container.click(function(){return t.toggleDisplay(),!1})},this.setup()};DLM_Reports_Date_Range_Selector.prototype.toggleDisplay=function(){this.opened?this.hide():this.display()},DLM_Reports_Date_Range_Selector.prototype.display=function(){this.opened||(this.opened=!0,this.el=this.createElement(),this.container.append(this.el))},DLM_Reports_Date_Range_Selector.prototype.hide=function(){this.opened=!1,this.el.remove()},DLM_Reports_Date_Range_Selector.prototype.apply=function(){var t=new Date(this.startDateInput.val()+"T00:00:00"),e=new Date(this.endDateInput.val()+"T00:00:00"),a=t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate(),n=e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate();this.hide(),window.location.replace(this.url+"&date_from="+a+"&date_to="+n)},DLM_Reports_Date_Range_Selector.prototype.createElement=function(){var t=this,e=jQuery("<div>").addClass("dlm_rdrs_overlay"),a=jQuery("<div>").addClass("dlm_rdrs_date").attr("id","dlm_rdrs_date_start"),n=jQuery("<div>").addClass("dlm_rdrs_date").attr("id","dlm_rdrs_date_end");this.startDateInput=jQuery("<input>").attr("type","hidden"),this.endDateInput=jQuery("<input>").attr("type","hidden");var r=jQuery("<div>").addClass("dlm_rdrs_actions"),i=jQuery("<a>").addClass("button").html("Apply").click(function(){return t.apply(),!1});return r.append(i),e.append(a).append(n).append(r).append(this.startDateInput).append(this.endDateInput),a.datepicker({inline:!0,altField:this.startDateInput,dateFormat:"yy-mm-dd",defaultDate:this.startDate}),n.datepicker({inline:!0,altField:this.endDateInput,dateFormat:"yy-mm-dd",defaultDate:this.endDate}),e.click(function(){return!1}),e};
assets/js/reports/reports.min.js CHANGED
@@ -1 +1 @@
1
- function DLM_createLoaderObj(){var a=document.createElement("div");a=jQuery(a),a.addClass("dlm_reports_loader");var b=document.createElement("img");return b=jQuery(b),b.attr("src",dlm_rs.img_path+"ajax-loader.gif"),a.append(b),a}jQuery(function(a){a.each(a(".dlm-reports-block-chart"),function(a,b){new DLM_Reports_Block_Chart(b)}),a.each(a(".dlm-reports-block-summary"),function(a,b){new DLM_Reports_Block_Summary(b)}),a.each(a(".dlm-reports-block-table"),function(a,b){new DLM_Reports_Block_Table(b)})});var DLM_Reports_Data=function(a){this.type=null,this.from=null,this.to=null,this.period=null,this.init=function(a){this.type=jQuery(a).data("type"),this.to=jQuery(a).data("to"),this.from=jQuery(a).data("from"),this.period=jQuery(a).data("period")},this.init(a)},DLM_Reports_Data_Fetch=function(a,b,c){this.id=a,this.data=b,this.cb=c,this.fetch()};DLM_Reports_Data_Fetch.prototype.fetch=function(){var a=this.id,b=this.cb,c=this.data.from,d=this.data.to,e=this.data.period;jQuery.get(ajaxurl,{action:"dlm_reports_data",nonce:dlm_rs.ajax_nonce,id:a,from:c,to:d,period:e},function(a){b(a)})};var DLM_Reports_Block_Chart=function(a){this.container=a,this.id=null,this.queryData=null,this.data=null,this.chart=null,this.setup=function(){this.id=jQuery(this.container).attr("id"),this.queryData=new DLM_Reports_Data(this.container),this.displayLoader(),this.fetch()},this.setup()};DLM_Reports_Block_Chart.prototype.displayLoader=function(){jQuery(this.container).append(DLM_createLoaderObj())},DLM_Reports_Block_Chart.prototype.hideLoader=function(){jQuery(this.container).find(".dlm_reports_loader").remove()},DLM_Reports_Block_Chart.prototype.fetch=function(){var a=this;new DLM_Reports_Data_Fetch(this.id,this.queryData,function(b){a.data=b,a.hideLoader(),a.render()})},DLM_Reports_Block_Chart.prototype.render=function(){null!==this.data&&(this.chart=new Chart({parent:this.container,title:"",data:this.data,type:this.queryData.type,height:250,show_dots:0,x_axis_mode:"tick",y_axis_mode:"span",is_series:1,format_tooltip_x:function(a){return(a+"").toUpperCase()},format_tooltip_y:function(a){return a+" downloads"}}))};var DLM_Reports_Block_Summary=function(a){this.container=a,this.id=null,this.data=null,this.data=null,this.chart=null,this.setup=function(){this.id=jQuery(this.container).attr("id"),this.data=new DLM_Reports_Data(this.container),this.displayLoader(),this.fetch()},this.setup()};DLM_Reports_Block_Summary.prototype.displayLoader=function(){jQuery(this.container).append(DLM_createLoaderObj())},DLM_Reports_Block_Summary.prototype.hideLoader=function(){jQuery(this.container).find(".dlm_reports_loader").remove()},DLM_Reports_Block_Summary.prototype.fetch=function(){var a=this;new DLM_Reports_Data_Fetch(this.id,this.data,function(b){a.data=b,a.hideLoader(),a.render()})},DLM_Reports_Block_Summary.prototype.render=function(){if(null!==this.data){var a=this;jQuery.each(this.data,function(b,c){jQuery(a.container).find("#"+b)&&jQuery(a.container).find("#"+b).find("span:first").html(c)})}};var DLM_Reports_Block_Table=function(a){this.container=a,this.id=null,this.data=null,this.data=null,this.chart=null,this.setup=function(){this.id=jQuery(this.container).attr("id"),this.data=new DLM_Reports_Data(this.container),this.displayLoader(),this.fetch()},this.setup()};DLM_Reports_Block_Table.prototype.displayLoader=function(){jQuery(this.container).append(DLM_createLoaderObj())},DLM_Reports_Block_Table.prototype.hideLoader=function(){jQuery(this.container).find(".dlm_reports_loader").remove()},DLM_Reports_Block_Table.prototype.fetch=function(){var a=this;new DLM_Reports_Data_Fetch(this.id,this.data,function(b){a.data=b,a.hideLoader(),a.render()})},DLM_Reports_Block_Table.prototype.render=function(){if(!(null===this.data||this.data.length<2)){var a=jQuery(document.createElement("table"));a.attr("cellspacing",0).attr("cellpadding",0).attr("border",0);for(var b=document.createElement("tr"),c=0;c<this.data[0].length;c++){var d=document.createElement("th");d.innerHTML=this.data[0][c],b.appendChild(d)}a.append(b);for(var c=1;c<this.data.length;c++){for(var e=document.createElement("tr"),f=0;f<this.data[c].length;f++){var g=document.createElement("td");g.innerHTML=this.data[c][f],e.appendChild(g)}a.append(e)}jQuery(this.container).html("").append(a)}};
1
+ function DLM_createLoaderObj(){var t=document.createElement("div");(t=jQuery(t)).addClass("dlm_reports_loader");var e=document.createElement("img");return(e=jQuery(e)).attr("src",dlm_rs.img_path+"ajax-loader.gif"),t.append(e),t}jQuery(function(t){t.each(t(".dlm-reports-block-chart"),function(t,e){new DLM_Reports_Block_Chart(e)}),t.each(t(".dlm-reports-block-summary"),function(t,e){new DLM_Reports_Block_Summary(e)}),t.each(t(".dlm-reports-block-table"),function(t,e){new DLM_Reports_Block_Table(e)})});var DLM_Reports_Data=function(t){this.type=null,this.from=null,this.to=null,this.period=null,this.init=function(t){this.type=jQuery(t).data("type"),this.to=jQuery(t).data("to"),this.from=jQuery(t).data("from"),this.period=jQuery(t).data("period")},this.init(t)},DLM_Reports_Data_Fetch=function(t,e,a){this.id=t,this.data=e,this.cb=a,this.fetch()};DLM_Reports_Data_Fetch.prototype.fetch=function(){var t=this.id,e=this.cb,a=this.data.from,r=this.data.to,i=this.data.period;jQuery.get(ajaxurl,{action:"dlm_reports_data",nonce:dlm_rs.ajax_nonce,id:t,from:a,to:r,period:i},function(t){e(t)})};var DLM_Reports_Block_Chart=function(t){this.container=t,this.id=null,this.queryData=null,this.data=null,this.chart=null,this.setup=function(){this.id=jQuery(this.container).attr("id"),this.queryData=new DLM_Reports_Data(this.container),this.displayLoader(),this.fetch()},this.setup()};DLM_Reports_Block_Chart.prototype.displayLoader=function(){jQuery(this.container).append(DLM_createLoaderObj())},DLM_Reports_Block_Chart.prototype.hideLoader=function(){jQuery(this.container).find(".dlm_reports_loader").remove()},DLM_Reports_Block_Chart.prototype.fetch=function(){var e=this;new DLM_Reports_Data_Fetch(this.id,this.queryData,function(t){e.data=t,e.hideLoader(),e.render()})},DLM_Reports_Block_Chart.prototype.render=function(){null!==this.data&&(this.chart=new Chart({parent:this.container,title:"",data:this.data,type:this.queryData.type,height:250,show_dots:0,x_axis_mode:"tick",y_axis_mode:"span",is_series:1,format_tooltip_x:function(t){return(t+"").toUpperCase()},format_tooltip_y:function(t){return t+" downloads"}}))};var DLM_Reports_Block_Summary=function(t){this.container=t,this.id=null,this.data=null,this.data=null,this.chart=null,this.setup=function(){this.id=jQuery(this.container).attr("id"),this.data=new DLM_Reports_Data(this.container),this.displayLoader(),this.fetch()},this.setup()};DLM_Reports_Block_Summary.prototype.displayLoader=function(){jQuery(this.container).append(DLM_createLoaderObj())},DLM_Reports_Block_Summary.prototype.hideLoader=function(){jQuery(this.container).find(".dlm_reports_loader").remove()},DLM_Reports_Block_Summary.prototype.fetch=function(){var e=this;new DLM_Reports_Data_Fetch(this.id,this.data,function(t){e.data=t,e.hideLoader(),e.render()})},DLM_Reports_Block_Summary.prototype.render=function(){if(null!==this.data){var a=this;jQuery.each(this.data,function(t,e){jQuery(a.container).find("#"+t)&&jQuery(a.container).find("#"+t).find("span:first").html(e)})}};var DLM_Reports_Block_Table=function(t){this.container=t,this.id=null,this.data=null,this.data=null,this.chart=null,this.setup=function(){this.id=jQuery(this.container).attr("id"),this.data=new DLM_Reports_Data(this.container),this.displayLoader(),this.fetch()},this.setup()};DLM_Reports_Block_Table.prototype.displayLoader=function(){jQuery(this.container).append(DLM_createLoaderObj())},DLM_Reports_Block_Table.prototype.hideLoader=function(){jQuery(this.container).find(".dlm_reports_loader").remove()},DLM_Reports_Block_Table.prototype.fetch=function(){var e=this;new DLM_Reports_Data_Fetch(this.id,this.data,function(t){e.data=t,e.hideLoader(),e.render()})},DLM_Reports_Block_Table.prototype.render=function(){if(!(null===this.data||this.data.length<2)){var t=jQuery(document.createElement("table"));t.attr("cellspacing",0).attr("cellpadding",0).attr("border",0);for(var e=document.createElement("tr"),a=0;a<this.data[0].length;a++){var r=document.createElement("th");r.innerHTML=this.data[0][a],e.appendChild(r)}t.append(e);for(a=1;a<this.data.length;a++){for(var i=document.createElement("tr"),o=0;o<this.data[a].length;o++){var n=document.createElement("td");n.innerHTML=this.data[a][o],i.appendChild(n)}t.append(i)}jQuery(this.container).html("").append(t)}};
assets/js/select2/select2.min.css ADDED
@@ -0,0 +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}
assets/js/select2/select2.min.js ADDED
@@ -0,0 +1 @@
 
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});
assets/js/settings.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){a("#setting-dlm_default_template").change(function(){"custom"===a(this).val()?a("#setting-dlm_custom_template").closest("tr").show():a("#setting-dlm_custom_template").closest("tr").hide()}).change(),a("#setting-dlm_enable_logging").change(function(){!0===a(this).is(":checked")?a("#setting-dlm_count_unique_ips").closest("tr").show():a("#setting-dlm_count_unique_ips").closest("tr").hide()}).change(),a(document).ready(function(){a.each(a(".dlm-lazy-select"),function(){var b=a(this);a("<span>").addClass("dlm-lazy-select-loader").append(a("<img>").attr("src",dlm_settings_vars.img_path+"ajax-loader.gif")).insertAfter(b),a.post(ajaxurl,{action:"dlm_settings_lazy_select",nonce:dlm_settings_vars.lazy_select_nonce,option:b.attr("name")},function(c){if(b.find("option").remove(),c)for(var d=b.data("selected"),e=0;e<c.length;e++){var f=a("<option>").attr("value",c[e].key).html(c[e].lbl);d===c[e].key&&f.attr("selected","selected"),b.append(f)}b.parent().find(".dlm-lazy-select-loader").remove()})})})});
1
+ jQuery(function(a){a("#setting-dlm_default_template").change(function(){"custom"===a(this).val()?a("#setting-dlm_custom_template").closest("tr").show():a("#setting-dlm_custom_template").closest("tr").hide()}).change(),a("#setting-dlm_enable_logging").change(function(){!0===a(this).is(":checked")?a("#setting-dlm_count_unique_ips").closest("tr").show():a("#setting-dlm_count_unique_ips").closest("tr").hide()}).change(),a(document).ready(function(){a.each(a(".dlm-lazy-select"),function(){var l=a(this);a("<span>").addClass("dlm-lazy-select-loader").append(a("<img>").attr("src",dlm_settings_vars.img_path+"ajax-loader.gif")).insertAfter(l),a.post(ajaxurl,{action:"dlm_settings_lazy_select",nonce:dlm_settings_vars.lazy_select_nonce,option:l.attr("name")},function(t){if(l.find("option").remove(),t)for(var e=l.data("selected"),n=0;n<t.length;n++){var s=a("<option>").attr("value",t[n].key).html(t[n].lbl);e===t[n].key&&s.attr("selected","selected"),l.append(s)}l.parent().find(".dlm-lazy-select-loader").remove()})})})});
assets/js/shop/admin-order-details.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){function b(){var b=a("#dlm-order-details-button-change-state"),c=b.html(),d=!1,e=null;b.click(function(){if(!d){d=!0,b.html("...");var f=a("#dlm-order-details-current-state").val();a.post(dlm_strings.ajax_url_change_order_status,{status:f,order_id:dlm_strings.order_id},function(f){!0===f.success&&(b.html(c),d=!1,null===e&&(e=a("<span>").addClass("dlm-order-details-update-successful").html("✓"),b.parent().append(e),setTimeout(function(){e.fadeOut(300,function(){e.remove(),e=null})},300)))})}})}b()});
1
+ jQuery(function(e){var s,l,n,r;s=e("#dlm-order-details-button-change-state"),l=s.html(),n=!1,r=null,s.click(function(){if(!n){n=!0,s.html("...");var t=e("#dlm-order-details-current-state").val();e.post(dlm_strings.ajax_url_change_order_status,{status:t,order_id:dlm_strings.order_id},function(t){!0===t.success&&(s.html(l),n=!1,null===r&&(r=e("<span>").addClass("dlm-order-details-update-successful").html("✓"),s.parent().append(r),setTimeout(function(){r.fadeOut(300,function(){r.remove(),r=null})},300)))})}})});
assets/js/shop/checkout.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){function b(b,c){for(var d=0;d<c.length;d++)a(b).find("#dlm_"+c[d]).addClass("dlm-checkout-field-error")}function c(b){a(b).find(".dlm-checkout-field-error").removeClass("dlm-checkout-field-error")}function d(b,c){var d=a("<div>").addClass("dlm-checkout-error");d.append(a("<img>").attr("src",dlm_strings.icon_error).attr("alt","Checkout error").addClass("dlm-checkout-error-icon")),d.append(a("<p>").html(c)),b.prepend(d)}function e(a){a.find(".dlm-checkout-error").remove()}function f(b){a(b).find("#dlm_checkout_submit").attr("disabled",!0);var c=a("<div>").addClass("dlm-checkout-overlay-bg"),d=a("<div>").addClass("dlm-checkout-overlay");d.append(a("<h2>").html(dlm_strings.overlay_title)),d.append(a("<span>").html(dlm_strings.overlay_body)),d.append(a("<img>").attr("src",dlm_strings.overlay_img_src)),a("body").append(c),a("body").append(d),c.fadeIn(300,function(){d.css("display","block").css("top","47%"),d.animate({top:"+=3%"},300)})}function g(b){var c=a(".dlm-checkout-overlay:first"),d=a(".dlm-checkout-overlay-bg:first");c.fadeOut(300,function(){c.remove()}),d.fadeOut(300,function(){d.remove(),a(b).find("#dlm_checkout_submit").attr("disabled",!1)})}a("#dlm-form-checkout").submit(function(h){var i=a(this);c(i),e(i),f(i);var j={first_name:i.find("#dlm_first_name").val(),last_name:i.find("#dlm_last_name").val(),company:i.find("#dlm_company").val(),email:i.find("#dlm_email").val(),address_1:i.find("#dlm_address_1").val(),postcode:i.find("#dlm_postcode").val(),city:i.find("#dlm_city").val(),country:i.find("#dlm_country").val()},k={payment_gateway:a("input[name=dlm_gateway]:checked",a(this)).val(),customer:j};void 0!==i.data("order_id")&&(k.order_id=i.data("order_id")),void 0!==i.data("order_hash")&&(k.order_hash=i.data("order_hash"));for(var l=[],m=!0,n=0;n<dlm_strings.required_fields.length;n++)""===j[dlm_strings.required_fields[n]]&&(m=!1,l.push(dlm_strings.required_fields[n]));return!1===m?(b(i,l),d(i,dlm_strings.error_message_required_fields),g(i),!1):(a.post(dlm_strings.ajax_url_place_order,k,function(a){if(!0===a.success&&void 0!==a.redirect)return window.location.replace(a.redirect),!1;!1===a.success&&""!==a.error&&d(i,a.error),g(i)}),!1)})});
1
+ jQuery(function(o){function s(d,r){var e=o("<div>").addClass("dlm-checkout-error");e.append(o("<img>").attr("src",dlm_strings.icon_error).attr("alt","Checkout error").addClass("dlm-checkout-error-icon")),e.append(o("<p>").html(r)),d.prepend(e)}function n(d){var r=o(".dlm-checkout-overlay:first"),e=o(".dlm-checkout-overlay-bg:first");r.fadeOut(300,function(){r.remove()}),e.fadeOut(300,function(){e.remove(),o(d).find("#dlm_checkout_submit").attr("disabled",!1)})}o("#dlm-form-checkout").submit(function(d){var r=o(this);o(r).find(".dlm-checkout-field-error").removeClass("dlm-checkout-field-error"),r.find(".dlm-checkout-error").remove(),function(d){o(d).find("#dlm_checkout_submit").attr("disabled",!0);var r=o("<div>").addClass("dlm-checkout-overlay-bg"),e=o("<div>").addClass("dlm-checkout-overlay");e.append(o("<h2>").html(dlm_strings.overlay_title)),e.append(o("<span>").html(dlm_strings.overlay_body)),e.append(o("<img>").attr("src",dlm_strings.overlay_img_src)),o("body").append(r),o("body").append(e),r.fadeIn(300,function(){e.css("display","block").css("top","47%"),e.animate({top:"+=3%"},300)})}(r);var e={first_name:r.find("#dlm_first_name").val(),last_name:r.find("#dlm_last_name").val(),company:r.find("#dlm_company").val(),email:r.find("#dlm_email").val(),address_1:r.find("#dlm_address_1").val(),postcode:r.find("#dlm_postcode").val(),city:r.find("#dlm_city").val(),country:r.find("#dlm_country").val()},a={payment_gateway:o("input[name=dlm_gateway]:checked",o(this)).val(),customer:e};void 0!==r.data("order_id")&&(a.order_id=r.data("order_id")),void 0!==r.data("order_hash")&&(a.order_hash=r.data("order_hash"));for(var t=[],i=!0,l=0;l<dlm_strings.required_fields.length;l++)""===e[dlm_strings.required_fields[l]]&&(i=!1,t.push(dlm_strings.required_fields[l]));return!1===i?(function(d,r){for(var e=0;e<r.length;e++)o(d).find("#dlm_"+r[e]).addClass("dlm-checkout-field-error")}(r,t),s(r,dlm_strings.error_message_required_fields),n(r)):o.post(dlm_strings.ajax_url_place_order,a,function(d){if(!0===d.success&&void 0!==d.redirect)return window.location.replace(d.redirect),!1;!1===d.success&&""!==d.error&&s(r,d.error),n(r)}),!1})});
assets/js/shop/edit-product.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ jQuery( function ( $ ) {
2
+ $('.dlm-select-ext').select2();
3
+ });
assets/js/shop/edit-product.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(function(e){e(".dlm-select-ext").select2()});
assets/views/meta-box/product-information.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="dlm_mb_shop_product_information">
2
+
3
+ <?php do_action( 'dlm_mb_product_information_start', $product->get_id(), $product ); ?>
4
+
5
+ <p class="dlm_shop_field_row">
6
+ <label class="dlm_shop_field_label"><?php printf( __( 'Price (%s)', 'download-monitor' ), \Never5\DownloadMonitor\Shop\Services\Services::get()->service( 'currency' )->get_currency_symbol() ); ?></label>
7
+ <span class="dlm_shop_field_input">
8
+ <input type="text" name="_dlm_price" value="<?php echo $price; ?>" class="dlm_shop_input" >
9
+ </span>
10
+ </p>
11
+
12
+ <p class="dlm_shop_field_row">
13
+ <label class="dlm_shop_field_label"><?php printf( __( 'Downloads', 'download-monitor' ), \Never5\DownloadMonitor\Shop\Services\Services::get()->service( 'currency' )->get_currency_symbol() ); ?></label>
14
+ <span class="dlm_shop_field_input">
15
+
16
+ <select id="dlm_downloads" name="_dlm_downloads[]"
17
+ multiple="true"
18
+ data-placeholder="<?php _e( 'Select Downloads&hellip;', 'download-monitor' ); ?>"
19
+ class="dlm-select-ext dlm_shop_input">
20
+ <?php if ( ! empty( $downloads ) ) : ?>
21
+ <?php foreach ( $downloads as $download ) : ?>
22
+ <option value="<?php echo esc_attr( $download->get_id() ); ?>" <?php selected( in_array( $download->get_id(), $current_download_ids ), true ); ?>><?php echo esc_html( $download->get_title() ); ?></option>
23
+ <?php endforeach; ?>
24
+ <?php endif; ?>
25
+ </select>
26
+
27
+ </span>
28
+ </p>
29
+
30
+ <?php /*
31
+ <p>
32
+ <label><?php _e( 'Taxable', 'download-monitor' ); ?></label>
33
+ <input type="checkbox" name="_dlm_taxable" value="1" <?php checked( true, $taxable ); ?>/>
34
+ </p>
35
+
36
+ <p>
37
+ <label><?php _e( 'Tax Class', 'download-monitor' ); ?></label>
38
+ <select name="_dlm_tax_class">
39
+ <?php
40
+ $classes = \Never5\DownloadMonitor\Shop\Services\Services::get()->service( 'tax_class_manager' )->get_tax_rates();
41
+ if ( count( $classes ) > 0 ) {
42
+ foreach ( $classes as $class ) {
43
+ echo "<option value='" . $class . "'" . selected( $tax_class, $class ) . ">" . $class . " " . __( 'rate', 'download-monitor' ) . "</option>";
44
+ }
45
+ }
46
+ ?>
47
+ </select>
48
+ </p>
49
+ */ ?>
50
+
51
+ <?php do_action( 'dlm_mb_product_information_end', $product->get_id(), $product ); ?>
52
+
53
+ </div>
assets/views/meta-box/shop.php DELETED
@@ -1,39 +0,0 @@
1
- <div class="dlm_mb_ecommerce">
2
-
3
- <?php do_action( 'dlm_mb_ecommerce_start', $download->get_id(), $download ); ?>
4
-
5
- <p>
6
- <label><?php _e( 'Is Purchasable', 'download-monitor' ); ?></label>
7
- <input type="checkbox" name="_dlm_is_purchasable"
8
- value="1" <?php checked( true, $download->is_purchasable() ); ?>/>
9
- </p>
10
-
11
- <p>
12
- <label><?php printf( __( 'Price (%s)', 'download-monitor' ), \Never5\DownloadMonitor\Shop\Services\Services::get()->service( 'currency' )->get_currency_symbol() ); ?></label>
13
- <input type="text" name="_dlm_price" value="<?php echo $price; ?>">
14
- </p>
15
-
16
- <?php /*
17
- <p>
18
- <label><?php _e( 'Taxable', 'download-monitor' ); ?></label>
19
- <input type="checkbox" name="_dlm_taxable" value="1" <?php checked( true, $taxable ); ?>/>
20
- </p>
21
-
22
- <p>
23
- <label><?php _e( 'Tax Class', 'download-monitor' ); ?></label>
24
- <select name="_dlm_tax_class">
25
- <?php
26
- $classes = \Never5\DownloadMonitor\Shop\Services\Services::get()->service( 'tax_class_manager' )->get_tax_rates();
27
- if ( count( $classes ) > 0 ) {
28
- foreach ( $classes as $class ) {
29
- echo "<option value='" . $class . "'" . selected( $tax_class, $class ) . ">" . $class . " " . __( 'rate', 'download-monitor' ) . "</option>";
30
- }
31
- }
32
- ?>
33
- </select>
34
- </p>
35
- */ ?>
36
-
37
- <?php do_action( 'dlm_mb_ecommerce_end', $download->get_id(), $download ); ?>
38
-
39
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
download-monitor.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: Download Monitor
4
  Plugin URI: https://www.download-monitor.com
5
- Description: A full solution for managing downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
- Version: 4.3.0
7
  Author: Never5
8
  Author URI: https://www.never5.com
9
  Requires at least: 3.8
@@ -33,7 +33,7 @@ if ( ! defined( 'ABSPATH' ) ) {
33
  } // Exit if accessed directly
34
 
35
  // Define DLM Version
36
- define( 'DLM_VERSION', '4.3.0' );
37
 
38
  // Define DLM FILE
39
  define( 'DLM_PLUGIN_FILE', __FILE__ );
2
  /*
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.4.0
7
  Author: Never5
8
  Author URI: https://www.never5.com
9
  Requires at least: 3.8
33
  } // Exit if accessed directly
34
 
35
  // Define DLM Version
36
+ define( 'DLM_VERSION', '4.4.0' );
37
 
38
  // Define DLM FILE
39
  define( 'DLM_PLUGIN_FILE', __FILE__ );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.barrykooij.com/donate/
4
  Tags: download, downloads, monitor, hits, download monitor, tracking, admin, count, counter, files, versions, download count, logging, AJAX, digital, documents, download category, download manager, download template, downloadmanager, file manager, file tree, grid, hits, ip-address, manager, media, monitor, password, protect downloads, tracker, sell, shop, ecommerce, paypal
5
  Requires at least: 3.8
6
  Tested up to: 5.1.0
7
- Stable tag: 4.3.0
8
  License: GPLv3
9
  Text Domain: -
10
  Requires PHP: 5.3
@@ -18,7 +18,7 @@ Download Monitor provides an interface for uploading and managing downloadable f
18
  = Features =
19
 
20
  * Add, edit and remove downloads from a familiar WP interface; Your downloads are just like posts.
21
- * Sell your downloads from within your WordPress websites!
22
  * 100% Gutenberg compatible, including a new Download Monitor Download Block. Type /download to use it!
23
  * Quick-add panel for adding downloads / files whilst editing posts.
24
  * Add multiple file versions to your downloads each with their own data like download count and file links.
@@ -118,6 +118,15 @@ More documentation can be found in our [Knowledge Base](https://www.download-mon
118
 
119
  == Changelog ==
120
 
 
 
 
 
 
 
 
 
 
121
  = 4.3.0: February 27, 2019 =
122
  * Feature: Added Shop (Beta) feature. You can now sell your downloads via Download Monitor! More addition to shop (like taxes and discounts) coming soon.
123
  * Feature: Added PayPal integration for shop feature.
@@ -532,4 +541,4 @@ More documentation can be found in our [Knowledge Base](https://www.download-mon
532
  = 1.0.0 =
533
  * Complete rewrite of the plugin making use of custom post types and other best practices. Fresh start version '1' to prevent auto-updates (legacy importer needs to be used to migrate from old versions).
534
 
535
- == Upgrade Notice ==
4
  Tags: download, downloads, monitor, hits, download monitor, tracking, admin, count, counter, files, versions, download count, logging, AJAX, digital, documents, download category, download manager, download template, downloadmanager, file manager, file tree, grid, hits, ip-address, manager, media, monitor, password, protect downloads, tracker, sell, shop, ecommerce, paypal
5
  Requires at least: 3.8
6
  Tested up to: 5.1.0
7
+ Stable tag: 4.4.0
8
  License: GPLv3
9
  Text Domain: -
10
  Requires PHP: 5.3
18
  = Features =
19
 
20
  * Add, edit and remove downloads from a familiar WP interface; Your downloads are just like posts.
21
+ * Sell your downloads from within your WordPress website!
22
  * 100% Gutenberg compatible, including a new Download Monitor Download Block. Type /download to use it!
23
  * Quick-add panel for adding downloads / files whilst editing posts.
24
  * Add multiple file versions to your downloads each with their own data like download count and file links.
118
 
119
  == Changelog ==
120
 
121
+ = 4.4.0: March 8, 2019 =
122
+ * Feature: Added a new product post type to create a clear separation between downloads and the products you can sell. Read more about this here: https://www.download-monitor.com/kb/products/
123
+ * Feature: Shop products now have a basic detail (single) page. This will be improved in future updates.
124
+ * Feature: Added "Paid Only" option to downloads. This allows you to require users to have a purchase linked to the download before file can be downloaded.
125
+ * Feature: Versions are now passed through the no-access page.
126
+ * Tweak: dlm_buy shortcode now takes a product id, instead of a download ID. These need to be updated manually.
127
+ * Tweak: Shop feature has been more isolated from non-shop. To enable shop, go to general Download Monitor settings and check "Enable Shop".
128
+ * Tweak: PayPal gateway is now enabled by default.
129
+
130
  = 4.3.0: February 27, 2019 =
131
  * Feature: Added Shop (Beta) feature. You can now sell your downloads via Download Monitor! More addition to shop (like taxes and discounts) coming soon.
132
  * Feature: Added PayPal integration for shop feature.
541
  = 1.0.0 =
542
  * Complete rewrite of the plugin making use of custom post types and other best practices. Fresh start version '1' to prevent auto-updates (legacy importer needs to be used to migrate from old versions).
543
 
544
+ == Upgrade Notice ==
src/Admin/Admin.php CHANGED
@@ -194,7 +194,17 @@ class DLM_Admin {
194
  $enqueue = false;
195
 
196
  if ( $hook == 'post-new.php' || $hook == 'post.php' || $hook == 'edit.php' ) {
197
- if ( ( ! empty( $_GET['post_type'] ) && $_GET['post_type'] == 'dlm_download' ) || ( ! empty( $post->post_type ) && 'dlm_download' === $post->post_type ) ) {
 
 
 
 
 
 
 
 
 
 
198
  $enqueue = true;
199
  }
200
  }
@@ -207,6 +217,10 @@ class DLM_Admin {
207
  $enqueue = true;
208
  }
209
 
 
 
 
 
210
  if ( ! $enqueue ) {
211
  return;
212
  }
194
  $enqueue = false;
195
 
196
  if ( $hook == 'post-new.php' || $hook == 'post.php' || $hook == 'edit.php' ) {
197
+ if (
198
+ ( ! empty( $_GET['post_type'] ) && in_array( $_GET['post_type'], array(
199
+ 'dlm_download',
200
+ \Never5\DownloadMonitor\Shop\Util\PostType::KEY
201
+ ) ) )
202
+ ||
203
+ ( ! empty( $post->post_type ) && in_array( $post->post_type, array(
204
+ 'dlm_download',
205
+ \Never5\DownloadMonitor\Shop\Util\PostType::KEY
206
+ ) ) )
207
+ ) {
208
  $enqueue = true;
209
  }
210
  }
217
  $enqueue = true;
218
  }
219
 
220
+ if ( isset( $_GET['page'] ) && 'download-monitor-orders' === $_GET['page'] ) {
221
+ $enqueue = true;
222
+ }
223
+
224
  if ( ! $enqueue ) {
225
  return;
226
  }
src/Admin/AdminScripts.php CHANGED
@@ -43,7 +43,11 @@ class DLM_Admin_Scripts {
43
  if ( $pagenow == 'post.php' || $pagenow == 'post-new.php' ) {
44
 
45
  // Enqueue Downloadable Files Metabox JS
46
- if ( ( $pagenow == 'post.php' && isset( $post ) && 'dlm_download' === $post->post_type ) || ( $pagenow == 'post-new.php' && isset( $_GET['post_type'] ) && 'dlm_download' == $_GET['post_type'] ) ) {
 
 
 
 
47
 
48
  // Enqueue Edit Download JS
49
  wp_enqueue_script(
@@ -57,6 +61,34 @@ class DLM_Admin_Scripts {
57
  wp_localize_script( 'dlm_edit_download', 'dlm_ed_strings', $this->get_strings( 'edit-download' ) );
58
  }
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  }
62
 
43
  if ( $pagenow == 'post.php' || $pagenow == 'post-new.php' ) {
44
 
45
  // Enqueue Downloadable Files Metabox JS
46
+ if (
47
+ ( $pagenow == 'post.php' && isset( $post ) && 'dlm_download' === $post->post_type )
48
+ ||
49
+ ( $pagenow == 'post-new.php' && isset( $_GET['post_type'] ) && 'dlm_download' == $_GET['post_type'] )
50
+ ) {
51
 
52
  // Enqueue Edit Download JS
53
  wp_enqueue_script(
61
  wp_localize_script( 'dlm_edit_download', 'dlm_ed_strings', $this->get_strings( 'edit-download' ) );
62
  }
63
 
64
+ // Enqueue Downloadable Files Metabox JS
65
+ if (
66
+ ( $pagenow == 'post.php' && isset( $post ) && \Never5\DownloadMonitor\Shop\Util\PostType::KEY === $post->post_type )
67
+ ||
68
+ ( $pagenow == 'post-new.php' && isset( $_GET['post_type'] ) && \Never5\DownloadMonitor\Shop\Util\PostType::KEY == $_GET['post_type'] )
69
+ ) {
70
+
71
+ // Enqueue Select2
72
+ wp_enqueue_script(
73
+ 'dlm_select2',
74
+ plugins_url( '/assets/js/select2/select2.min.js', $dlm->get_plugin_file() ),
75
+ array( 'jquery' ),
76
+ DLM_VERSION
77
+ );
78
+
79
+ wp_enqueue_style( 'dlm_select2_css', download_monitor()->get_plugin_url() . '/assets/js/select2/select2.min.css' );
80
+
81
+ // Enqueue Edit Product JS
82
+ wp_enqueue_script(
83
+ 'dlm_edit_product',
84
+ plugins_url( '/assets/js/shop/edit-product' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
85
+ array( 'jquery', 'dlm_select2' ),
86
+ DLM_VERSION
87
+ );
88
+
89
+ // Make JavaScript strings translatable
90
+ wp_localize_script( 'dlm_edit_product', 'dlm_ep_strings', $this->get_strings( 'edit-product' ) );
91
+ }
92
 
93
  }
94
 
src/Admin/Settings/Settings.php CHANGED
@@ -81,6 +81,14 @@ class DLM_Admin_Settings {
81
  'label' => __( 'Custom Template', 'download-monitor' ),
82
  'desc' => __( 'Leaving this blank will use the default <code>content-download.php</code> template file. If you enter, for example, <code>button</code>, the <code>content-download-button.php</code> template will be used instead. You can add custom templates inside your theme folder.', 'download-monitor' )
83
  ),
 
 
 
 
 
 
 
 
84
  array(
85
  'name' => 'dlm_xsendfile_enabled',
86
  'std' => '',
@@ -281,28 +289,35 @@ class DLM_Admin_Settings {
281
  'desc' => __( "Choose what page is displayed when the user has no access to a file. Don't forget to add the <code>[dlm_no_access]</code> shortcode to the page.", 'download-monitor' ),
282
  'type' => 'lazy_select',
283
  'options' => array()
284
- ),
285
- array(
286
- 'name' => 'dlm_page_cart',
287
- 'std' => '',
288
- 'label' => __( 'Cart page', 'download-monitor' ),
289
- 'desc' => __( 'Your cart page, make sure it has the <code>[dlm_cart]</code> shortcode.', 'download-monitor' ),
290
- 'type' => 'lazy_select',
291
- 'options' => array()
292
- ),
293
- array(
294
- 'name' => 'dlm_page_checkout',
295
- 'std' => '',
296
- 'label' => __( 'Checkout page', 'download-monitor' ),
297
- 'desc' => __( 'Your checkout page, make sure it has the <code>[dlm_checkout]</code> shortcode.', 'download-monitor' ),
298
- 'type' => 'lazy_select',
299
- 'options' => array()
300
- ),
301
  )
302
  )
303
  )
304
- ),
305
- 'shop' => array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
306
  'title' => __( 'Shop', 'download-monitor' ),
307
  'sections' => array(
308
  'general' => array(
@@ -362,33 +377,36 @@ class DLM_Admin_Settings {
362
  )
363
  )
364
  )
365
- ),
366
- 'payments' => array(
 
367
  'title' => __( 'Payment Methods', 'download-monitor' ),
368
  'sections' => $this->get_payment_methods_sections()
369
- ),
370
- 'misc' => array(
371
- 'title' => __( 'Misc', 'download-monitor' ),
372
- 'sections' => array(
373
- 'misc' => array(
374
- 'fields' => array(
375
- array(
376
- 'name' => 'dlm_clean_on_uninstall',
377
- 'std' => '0',
378
- 'label' => __( 'Remove Data on Uninstall?', 'download-monitor' ),
379
- 'cb_label' => __( 'Enable', 'download-monitor' ),
380
- 'desc' => __( 'Check this box if you would like to completely remove all Download Monitor data when the plugin is deleted.', 'download-monitor' ),
381
- 'type' => 'checkbox'
382
- ),
383
- array(
384
- 'name' => 'dlm_clear_transients',
385
- 'std' => '0',
386
- 'label' => __( 'Clear all transients', 'download-monitor' ),
387
- 'desc' => __( 'Remove all Download Monitor transients, this can solve version caching issues.', 'download-monitor' ),
388
- 'type' => 'action_button',
389
- 'link' => self::get_url() . '#settings-misc'
390
- ),
391
- )
 
 
392
  )
393
  )
394
  )
@@ -448,7 +466,7 @@ class DLM_Admin_Settings {
448
  )
449
  );
450
 
451
- $settings[$tab_key] = $new_tab;
452
  }
453
  }
454
 
81
  'label' => __( 'Custom Template', 'download-monitor' ),
82
  'desc' => __( 'Leaving this blank will use the default <code>content-download.php</code> template file. If you enter, for example, <code>button</code>, the <code>content-download-button.php</code> template will be used instead. You can add custom templates inside your theme folder.', 'download-monitor' )
83
  ),
84
+ array(
85
+ 'name' => 'dlm_shop_enabled',
86
+ 'std' => '',
87
+ 'label' => __( 'Shop Enabled', 'download-monitor' ),
88
+ 'cb_label' => __( 'Enable Shop', 'download-monitor' ),
89
+ 'desc' => __( 'If enabled, allows you to sell your downloads via Download Monitor.', 'download-monitor' ),
90
+ 'type' => 'checkbox'
91
+ ),
92
  array(
93
  'name' => 'dlm_xsendfile_enabled',
94
  'std' => '',
289
  'desc' => __( "Choose what page is displayed when the user has no access to a file. Don't forget to add the <code>[dlm_no_access]</code> shortcode to the page.", 'download-monitor' ),
290
  'type' => 'lazy_select',
291
  'options' => array()
292
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  )
294
  )
295
  )
296
+ )
297
+
298
+ );
299
+
300
+ if ( dlm_is_shop_enabled() ) {
301
+
302
+ $settings['pages']['sections']['pages']['fields'][] = array(
303
+ 'name' => 'dlm_page_cart',
304
+ 'std' => '',
305
+ 'label' => __( 'Cart page', 'download-monitor' ),
306
+ 'desc' => __( 'Your cart page, make sure it has the <code>[dlm_cart]</code> shortcode.', 'download-monitor' ),
307
+ 'type' => 'lazy_select',
308
+ 'options' => array()
309
+ );
310
+
311
+ $settings['pages']['sections']['pages']['fields'][] = array(
312
+ 'name' => 'dlm_page_checkout',
313
+ 'std' => '',
314
+ 'label' => __( 'Checkout page', 'download-monitor' ),
315
+ 'desc' => __( 'Your checkout page, make sure it has the <code>[dlm_checkout]</code> shortcode.', 'download-monitor' ),
316
+ 'type' => 'lazy_select',
317
+ 'options' => array()
318
+ );
319
+
320
+ $settings['shop'] = array(
321
  'title' => __( 'Shop', 'download-monitor' ),
322
  'sections' => array(
323
  'general' => array(
377
  )
378
  )
379
  )
380
+ );
381
+
382
+ $settings['payments'] = array(
383
  'title' => __( 'Payment Methods', 'download-monitor' ),
384
  'sections' => $this->get_payment_methods_sections()
385
+ );
386
+ }
387
+
388
+
389
+ $settings['misc'] = array(
390
+ 'title' => __( 'Misc', 'download-monitor' ),
391
+ 'sections' => array(
392
+ 'misc' => array(
393
+ 'fields' => array(
394
+ array(
395
+ 'name' => 'dlm_clean_on_uninstall',
396
+ 'std' => '0',
397
+ 'label' => __( 'Remove Data on Uninstall?', 'download-monitor' ),
398
+ 'cb_label' => __( 'Enable', 'download-monitor' ),
399
+ 'desc' => __( 'Check this box if you would like to completely remove all Download Monitor data when the plugin is deleted.', 'download-monitor' ),
400
+ 'type' => 'checkbox'
401
+ ),
402
+ array(
403
+ 'name' => 'dlm_clear_transients',
404
+ 'std' => '0',
405
+ 'label' => __( 'Clear all transients', 'download-monitor' ),
406
+ 'desc' => __( 'Remove all Download Monitor transients, this can solve version caching issues.', 'download-monitor' ),
407
+ 'type' => 'action_button',
408
+ 'link' => self::get_url() . '#settings-misc'
409
+ ),
410
  )
411
  )
412
  )
466
  )
467
  );
468
 
469
+ $settings[ $tab_key ] = $new_tab;
470
  }
471
  }
472
 
src/Admin/Settings/SettingsHelper.php CHANGED
@@ -17,15 +17,17 @@ class DLM_Settings_Helper {
17
  */
18
  private function setup_defaults() {
19
  $this->defaults = apply_filters( 'dlm_settings_defaults', array(
20
- 'no_access_page' => 0,
21
- 'page_cart' => 0,
22
- 'page_checkout' => 0,
23
- 'currency' => 'USD',
24
- 'currency_pos' => 'left',
25
- 'decimal_separator' => '.',
26
- 'thousand_separator' => ',',
27
- 'default_gateway' => 'paypal',
28
- 'disable_cart' => '0',
 
 
29
  ) );
30
  }
31
 
17
  */
18
  private function setup_defaults() {
19
  $this->defaults = apply_filters( 'dlm_settings_defaults', array(
20
+ 'dlm_shop_enabled' => 0,
21
+ 'no_access_page' => 0,
22
+ 'page_cart' => 0,
23
+ 'page_checkout' => 0,
24
+ 'currency' => 'USD',
25
+ 'currency_pos' => 'left',
26
+ 'decimal_separator' => '.',
27
+ 'thousand_separator' => ',',
28
+ 'default_gateway' => 'paypal',
29
+ 'disable_cart' => '0',
30
+ 'gateway_paypal_enabled' => '1',
31
  ) );
32
  }
33
 
src/Admin/WritePanels.php CHANGED
@@ -292,13 +292,6 @@ class DLM_Admin_Writepanels {
292
  */
293
  public function save_meta_boxes( $post_id, $post ) {
294
 
295
- // we set if the download is purchasable hard here so we get the right download object from retrieve_single()
296
- if ( isset( $_POST['_dlm_is_purchasable'] ) ) {
297
- update_post_meta( $post_id, '_is_purchasable', 1 );
298
- } else {
299
- update_post_meta( $post_id, '_is_purchasable', 0 );
300
- }
301
-
302
  /**
303
  * Fetch old download object
304
  * There are certain props we don't need to manually persist here because WP does this automatically for us.
@@ -324,29 +317,6 @@ class DLM_Admin_Writepanels {
324
  $download->set_members_only( ( isset( $_POST['_members_only'] ) ) );
325
  $download->set_redirect_only( ( isset( $_POST['_redirect_only'] ) ) );
326
 
327
- // is this download purchasable?
328
- $download->set_purchasable( ( isset( $_POST['_dlm_is_purchasable'] ) ) );
329
-
330
- if ( method_exists( $download, 'set_price_from_user_input' ) ) {
331
- $download->set_price_from_user_input( $_POST['_dlm_price'] );
332
- }
333
-
334
- /*
335
- if ( method_exists( $download, 'set_taxable' ) ) {
336
- if ( isset( $_POST['_dlm_taxable'] ) ) {
337
- $download->set_taxable( true );
338
- } else {
339
- $download->set_taxable( false );
340
- }
341
- }
342
- */
343
-
344
- /*
345
- if ( method_exists( $download, 'set_tax_class' ) ) {
346
- $download->set_tax_class( $_POST['_dlm_tax_class'] );
347
- }
348
- */
349
-
350
  $total_download_count = 0;
351
 
352
  // Process files
292
  */
293
  public function save_meta_boxes( $post_id, $post ) {
294
 
 
 
 
 
 
 
 
295
  /**
296
  * Fetch old download object
297
  * There are certain props we don't need to manually persist here because WP does this automatically for us.
317
  $download->set_members_only( ( isset( $_POST['_members_only'] ) ) );
318
  $download->set_redirect_only( ( isset( $_POST['_redirect_only'] ) ) );
319
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
  $total_download_count = 0;
321
 
322
  // Process files
src/Download/Download.php CHANGED
@@ -51,9 +51,6 @@ class DLM_Download {
51
  /** @var array */
52
  private $version_ids = array();
53
 
54
- /** @var bool */
55
- private $purchasable = false;
56
-
57
  /**
58
  * @var WP_Post
59
  * @deprecated 4.0
@@ -506,20 +503,6 @@ class DLM_Download {
506
  return apply_filters( 'dlm_download_get_versions', $this->versions, $this );
507
  }
508
 
509
- /**
510
- * @return bool
511
- */
512
- public function is_purchasable() {
513
- return $this->purchasable;
514
- }
515
-
516
- /**
517
- * @param bool $purchasable
518
- */
519
- public function set_purchasable( $purchasable ) {
520
- $this->purchasable = $purchasable;
521
- }
522
-
523
  /**
524
  *
525
  * Deprecated methods below.
51
  /** @var array */
52
  private $version_ids = array();
53
 
 
 
 
54
  /**
55
  * @var WP_Post
56
  * @deprecated 4.0
503
  return apply_filters( 'dlm_download_get_versions', $this->versions, $this );
504
  }
505
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
506
  /**
507
  *
508
  * Deprecated methods below.
src/Download/WordPressDownloadRepository.php CHANGED
@@ -112,14 +112,6 @@ class DLM_WordPress_Download_Repository implements DLM_Download_Repository {
112
  $download->set_featured( ( 'yes' == get_post_meta( $post->ID, '_featured', true ) ) );
113
  $download->set_members_only( ( 'yes' == get_post_meta( $post->ID, '_members_only', true ) ) );
114
  $download->set_download_count( absint( get_post_meta( $post->ID, '_download_count', true ) ) );
115
- $download->set_purchasable( ( 1 == get_post_meta( $post->ID, '_is_purchasable', true ) ) );
116
-
117
- if ( $download->is_purchasable() ) {
118
- $download->set_price( get_post_meta( $post->ID, '_price', true ) );
119
- $download->set_taxable( ( 1 == get_post_meta( $post->ID, '_taxable', true ) ) );
120
- $download->set_tax_class( get_post_meta( $post->ID, '_tax_class', true ) );
121
- }
122
-
123
 
124
  // This is added for backwards compatibility but will be removed in a later version!
125
  $download->post = $post;
@@ -186,34 +178,6 @@ class DLM_WordPress_Download_Repository implements DLM_Download_Repository {
186
  // other download meta
187
  update_post_meta( $download_id, '_download_count', $download->get_download_count() );
188
 
189
- // check if this product is purchasable.
190
- if ( $download->is_purchasable() ) {
191
- update_post_meta( $download_id, '_is_purchasable', 1 );
192
- } else {
193
- update_post_meta( $download_id, '_is_purchasable', 0 );
194
- }
195
-
196
- // update E-Commerce meta
197
- if ( method_exists( $download, 'get_price' ) ) {
198
- update_post_meta( $download_id, '_price', $download->get_price() );
199
- }
200
-
201
- if ( method_exists( $download, 'is_taxable' ) ) {
202
- if ( $download->is_taxable() ) {
203
- update_post_meta( $download_id, '_taxable', 1 );
204
- } else {
205
- update_post_meta( $download_id, '_taxable', 0 );
206
- }
207
- }
208
-
209
- if ( method_exists( $download, 'get_price' ) ) {
210
- update_post_meta( $download_id, '_price', $download->get_price() );
211
- }
212
-
213
- if ( method_exists( $download, 'get_tax_class' ) ) {
214
- update_post_meta( $download_id, '_tax_class', $download->get_tax_class() );
215
- }
216
-
217
  // clear versions transient
218
  download_monitor()->service( 'transient_manager' )->clear_versions_transient( $download_id );
219
 
112
  $download->set_featured( ( 'yes' == get_post_meta( $post->ID, '_featured', true ) ) );
113
  $download->set_members_only( ( 'yes' == get_post_meta( $post->ID, '_members_only', true ) ) );
114
  $download->set_download_count( absint( get_post_meta( $post->ID, '_download_count', true ) ) );
 
 
 
 
 
 
 
 
115
 
116
  // This is added for backwards compatibility but will be removed in a later version!
117
  $download->post = $post;
178
  // other download meta
179
  update_post_meta( $download_id, '_download_count', $download->get_download_count() );
180
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  // clear versions transient
182
  download_monitor()->service( 'transient_manager' )->clear_versions_transient( $download_id );
183
 
src/DownloadHandler.php CHANGED
@@ -150,7 +150,7 @@ class DLM_Download_Handler {
150
  if ( ! empty( $blacklisted_ua ) ) {
151
 
152
  // check if blacklisted user agent is found in request user agent
153
- if ( '/' == $blacklisted_ua[0] && '/' == substr( $blacklisted_ua, -1 ) ) { // /regex/ pattern
154
  if ( preg_match( $blacklisted_ua, $visitor_ua ) ) {
155
  $can_download = false;
156
  break;
@@ -219,7 +219,7 @@ class DLM_Download_Handler {
219
  }
220
 
221
  // check if endpoint is set but is empty
222
- if ( apply_filters( 'dlm_empty_download_redirect_enabled', true ) && isset ( $wp->query_vars[ $this->endpoint ] ) && empty ($wp->query_vars[ $this->endpoint ] ) ) {
223
  wp_redirect( apply_filters( 'dlm_empty_download_redirect_url', home_url() ) );
224
  exit;
225
  }
@@ -282,7 +282,7 @@ class DLM_Download_Handler {
282
  if ( $download_id > 0 ) {
283
  try {
284
  $download = download_monitor()->service( 'download_repository' )->retrieve_single( $download_id );
285
- }catch (Exception $e) {
286
  // download not found
287
  }
288
 
@@ -387,7 +387,7 @@ class DLM_Download_Handler {
387
  $this->cache_headers();
388
 
389
  /** @var DLM_Download_Version $version */
390
- $version = $download->get_version();
391
 
392
  /** @var array $file_paths */
393
  $file_paths = $version->get_mirrors();
@@ -429,6 +429,10 @@ class DLM_Download_Handler {
429
  // append download id to no access URL
430
  $no_access_permalink = untrailingslashit( $no_access_permalink ) . '/download-id/' . $download->get_id() . '/';
431
 
 
 
 
 
432
  // redirect to no access page
433
  wp_redirect( $no_access_permalink );
434
 
150
  if ( ! empty( $blacklisted_ua ) ) {
151
 
152
  // check if blacklisted user agent is found in request user agent
153
+ if ( '/' == $blacklisted_ua[0] && '/' == substr( $blacklisted_ua, - 1 ) ) { // /regex/ pattern
154
  if ( preg_match( $blacklisted_ua, $visitor_ua ) ) {
155
  $can_download = false;
156
  break;
219
  }
220
 
221
  // check if endpoint is set but is empty
222
+ if ( apply_filters( 'dlm_empty_download_redirect_enabled', true ) && isset ( $wp->query_vars[ $this->endpoint ] ) && empty ( $wp->query_vars[ $this->endpoint ] ) ) {
223
  wp_redirect( apply_filters( 'dlm_empty_download_redirect_url', home_url() ) );
224
  exit;
225
  }
282
  if ( $download_id > 0 ) {
283
  try {
284
  $download = download_monitor()->service( 'download_repository' )->retrieve_single( $download_id );
285
+ } catch ( Exception $e ) {
286
  // download not found
287
  }
288
 
387
  $this->cache_headers();
388
 
389
  /** @var DLM_Download_Version $version */
390
+ $version = $download->get_version();
391
 
392
  /** @var array $file_paths */
393
  $file_paths = $version->get_mirrors();
429
  // append download id to no access URL
430
  $no_access_permalink = untrailingslashit( $no_access_permalink ) . '/download-id/' . $download->get_id() . '/';
431
 
432
+ if ( ! $download->get_version()->is_latest() ) {
433
+ $no_access_permalink = add_query_arg( 'version', $download->get_version()->get_version(), $no_access_permalink );
434
+ }
435
+
436
  // redirect to no access page
437
  wp_redirect( $no_access_permalink );
438
 
src/Installer.php CHANGED
@@ -150,7 +150,7 @@ class DLM_Installer {
150
  `order_id` INT UNSIGNED NOT NULL,
151
  `label` VARCHAR(255) NULL,
152
  `qty` INT NULL,
153
- `download_id` INT UNSIGNED NULL,
154
  `tax_class` VARCHAR(255) NULL,
155
  `tax_total` INT NULL,
156
  `subtotal` INT NULL,
150
  `order_id` INT UNSIGNED NOT NULL,
151
  `label` VARCHAR(255) NULL,
152
  `qty` INT NULL,
153
+ `product_id` INT UNSIGNED NULL,
154
  `tax_class` VARCHAR(255) NULL,
155
  `tax_total` INT NULL,
156
  `subtotal` INT NULL,
src/PostTypeManager.php CHANGED
@@ -61,7 +61,8 @@ class DLM_Post_Type_Manager {
61
  'custom-fields'
62
  ) ),
63
  'has_archive' => false,
64
- 'show_in_nav_menus' => false
 
65
  ) )
66
  );
67
 
@@ -95,6 +96,9 @@ class DLM_Post_Type_Manager {
95
  ) )
96
  );
97
 
 
 
 
98
  }
99
 
100
  }
61
  'custom-fields'
62
  ) ),
63
  'has_archive' => false,
64
+ 'show_in_nav_menus' => false,
65
+ 'menu_position' => 35
66
  ) )
67
  );
68
 
96
  ) )
97
  );
98
 
99
+ do_action( 'dlm_after_post_type_register' );
100
+
101
+
102
  }
103
 
104
  }
src/Shop/Access/Manager.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace Never5\DownloadMonitor\Shop\Access;
4
 
 
5
  use Never5\DownloadMonitor\Shop\Services\Services;
6
 
7
  class Manager {
@@ -25,46 +26,79 @@ class Manager {
25
  public function check_access( $has_access, $download, $version ) {
26
 
27
  // check if request still has access at this point this is a purchasable download
28
- if ( true === $has_access && $download->is_purchasable() ) {
29
 
30
  /**
31
- * This is a purchasable product.
32
- * This means we need an order_id and an order_hash set in request
33
  */
 
34
 
35
  $order_id = ( isset( $_GET['order_id'] ) ? absint( $_GET['order_id'] ) : "" );
36
  $order_hash = ( isset( $_GET['order_hash'] ) ? $_GET['order_hash'] : "" );
37
 
38
  // if id or hash are empty, no access for you
39
  if ( empty( $order_id ) || empty( $order_hash ) ) {
40
- return false;
41
  }
42
 
43
  /** @var \Never5\DownloadMonitor\Shop\Order\Repository $order_repo */
44
  $order_repo = Services::get()->service( 'order_repository' );
45
 
 
 
 
46
  // try to fetch order with given order ID
47
  try {
48
  $order = $order_repo->retrieve_single( $order_id );
49
  } catch ( \Exception $exception ) {
50
  // can't find your order? no access for you
51
- return false;
52
  }
53
 
54
  // check if the given hash matches the hash we know the order has
55
  if ( $order_hash !== $order->get_hash() ) {
56
- return false;
57
  }
58
 
59
  // check if the order has the complete status
60
  if ( $order->get_status()->get_key() !== 'completed' ) {
61
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
63
 
64
- /**
65
- * This request is valid.
66
- * We do not return false, leaving $has_access to what it is (which is true if this point is reached).
67
- */
68
  }
69
 
70
  return $has_access;
2
 
3
  namespace Never5\DownloadMonitor\Shop\Access;
4
 
5
+ use Never5\DownloadMonitor\Shop\Admin\DownloadOption;
6
  use Never5\DownloadMonitor\Shop\Services\Services;
7
 
8
  class Manager {
26
  public function check_access( $has_access, $download, $version ) {
27
 
28
  // check if request still has access at this point this is a purchasable download
29
+ if ( true === $has_access && 1 == get_post_meta( $download->get_id(), DownloadOption::OPTION_KEY, true ) ) {
30
 
31
  /**
32
+ * This is a download that requires a purchase.
 
33
  */
34
+ $has_access = false;
35
 
36
  $order_id = ( isset( $_GET['order_id'] ) ? absint( $_GET['order_id'] ) : "" );
37
  $order_hash = ( isset( $_GET['order_hash'] ) ? $_GET['order_hash'] : "" );
38
 
39
  // if id or hash are empty, no access for you
40
  if ( empty( $order_id ) || empty( $order_hash ) ) {
41
+ return $has_access;
42
  }
43
 
44
  /** @var \Never5\DownloadMonitor\Shop\Order\Repository $order_repo */
45
  $order_repo = Services::get()->service( 'order_repository' );
46
 
47
+ /** @var \Never5\DownloadMonitor\Shop\Product\Repository $product_repo */
48
+ $product_repo = Services::get()->service( 'product_repository' );
49
+
50
  // try to fetch order with given order ID
51
  try {
52
  $order = $order_repo->retrieve_single( $order_id );
53
  } catch ( \Exception $exception ) {
54
  // can't find your order? no access for you
55
+ return $has_access;
56
  }
57
 
58
  // check if the given hash matches the hash we know the order has
59
  if ( $order_hash !== $order->get_hash() ) {
60
+ return $has_access;
61
  }
62
 
63
  // check if the order has the complete status
64
  if ( $order->get_status()->get_key() !== 'completed' ) {
65
+ return $has_access;
66
+ }
67
+
68
+ // check if this download id exists in one of the products that's purchased in this order
69
+ $order_items = $order->get_items();
70
+
71
+ foreach ( $order_items as $order_item ) {
72
+
73
+ /**
74
+ * Fetch product
75
+ */
76
+ try {
77
+
78
+ $product = $product_repo->retrieve_single( $order_item->get_product_id() );
79
+
80
+ $download_ids = $product->get_download_ids();
81
+
82
+ if ( ! empty( $download_ids ) ) {
83
+ foreach ( $download_ids as $download_id ) {
84
+ if ( intval( $download_id ) === intval( $download->get_id() ) ) {
85
+ $has_access = true;
86
+ break;
87
+ }
88
+
89
+ }
90
+ }
91
+
92
+ } catch ( \Exception $exception ) {
93
+ }
94
+
95
+ // if we have access as this point, we stop checking the other items
96
+ if ( $has_access ) {
97
+ break;
98
+ }
99
+
100
  }
101
 
 
 
 
 
102
  }
103
 
104
  return $has_access;
src/Shop/Admin/DownloadOption.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Never5\DownloadMonitor\Shop\Admin;
4
+
5
+ class DownloadOption {
6
+
7
+ const OPTION_KEY = '_paid_only';
8
+
9
+ /**
10
+ * Setup the download option
11
+ */
12
+ public function setup() {
13
+
14
+ // Add option
15
+ add_action( 'dlm_options_end', array( $this, 'add_download_option' ), 10, 1 );
16
+
17
+ // Save download options
18
+ add_action( 'dlm_save_metabox', array( $this, 'save_download_option' ), 10, 1 );
19
+ }
20
+
21
+ /**
22
+ * Add mail lock to download options
23
+ *
24
+ * @param $post_id
25
+ */
26
+ public function add_download_option( $post_id ) {
27
+ echo '<p class="form-field form-field-checkbox">
28
+ <input type="checkbox" name="' . self::OPTION_KEY . '" id="' . self::OPTION_KEY . '" ' . checked( get_post_meta( $post_id, self::OPTION_KEY, true ), '1', false ) . ' />
29
+ <label for="' . self::OPTION_KEY . '">' . __( 'Paid Only', 'download-monitor' ) . '</label>
30
+ <span class="dlm-description">' . __( 'Only users who purchased a product that contains this download will be able to access the file.', 'download-monitor' ) . '</span>
31
+ </p>';
32
+ }
33
+
34
+ /**
35
+ * Save download option
36
+ *
37
+ * @param $post_id
38
+ */
39
+ public function save_download_option( $post_id ) {
40
+ $enabled = ( isset( $_POST[ self::OPTION_KEY ] ) );
41
+ delete_post_meta( $post_id, self::OPTION_KEY );
42
+ if ( $enabled ) {
43
+ add_post_meta( $post_id, self::OPTION_KEY, 1 );
44
+ }
45
+ }
46
+ }
src/Shop/Admin/OrderTable.php CHANGED
@@ -3,6 +3,7 @@
3
  namespace Never5\DownloadMonitor\Shop\Admin;
4
 
5
  use Never5\DownloadMonitor\Shop\Services\Services;
 
6
 
7
  if ( ! class_exists( '\WP_List_Table' ) ) {
8
  require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
@@ -55,13 +56,13 @@ class OrderTable extends \WP_List_Table {
55
  * Empty trash
56
  */
57
  private function empty_trash() {
58
- if(Services::get()->service( 'order_repository' )->empty_trash()) {
59
- ?>
60
  <div id="message" class="updated notice notice-success">
61
  <p><?php _e( 'Trashed orders have been permanently deleted.', 'download-monitor' ); ?></p>
62
  </div>
63
- <?php
64
- }
65
  }
66
 
67
  /**
@@ -70,7 +71,7 @@ class OrderTable extends \WP_List_Table {
70
  * @return string
71
  */
72
  private function get_base_url() {
73
- return admin_url( "edit.php?post_type=dlm_download&page=download-monitor-orders" );
74
  }
75
 
76
  /**
@@ -279,8 +280,8 @@ class OrderTable extends \WP_List_Table {
279
  value="-1" <?php selected( $this->orders_per_page, - 1 ) ?>><?php _e( 'Show All', 'download-monitor' ); ?></option>
280
  </select>
281
 
282
- <input type="hidden" name="post_type" value="dlm_download"/>
283
- <input type="hidden" name="page" value="download-monitor-logs"/>
284
  <input type="submit" value="<?php _e( 'Filter', 'download-monitor' ); ?>" class="button"/>
285
 
286
  <?php
@@ -383,6 +384,8 @@ class OrderTable extends \WP_List_Table {
383
  */
384
  public function process_bulk_action() {
385
 
 
 
386
  if ( 'delete' === $this->current_action() ) {
387
 
388
  // check nonce
@@ -392,7 +395,7 @@ class OrderTable extends \WP_List_Table {
392
 
393
  // check capability
394
  if ( ! current_user_can( 'dlm_manage_logs' ) ) {
395
- wp_die( "You're not allowed to delete logs!" );
396
  }
397
 
398
  // check
3
  namespace Never5\DownloadMonitor\Shop\Admin;
4
 
5
  use Never5\DownloadMonitor\Shop\Services\Services;
6
+ use Never5\DownloadMonitor\Shop\Util\PostType;
7
 
8
  if ( ! class_exists( '\WP_List_Table' ) ) {
9
  require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
56
  * Empty trash
57
  */
58
  private function empty_trash() {
59
+ if ( Services::get()->service( 'order_repository' )->empty_trash() ) {
60
+ ?>
61
  <div id="message" class="updated notice notice-success">
62
  <p><?php _e( 'Trashed orders have been permanently deleted.', 'download-monitor' ); ?></p>
63
  </div>
64
+ <?php
65
+ }
66
  }
67
 
68
  /**
71
  * @return string
72
  */
73
  private function get_base_url() {
74
+ return admin_url( sprintf( "edit.php?post_type=%s&page=download-monitor-orders", PostType::KEY ) );
75
  }
76
 
77
  /**
280
  value="-1" <?php selected( $this->orders_per_page, - 1 ) ?>><?php _e( 'Show All', 'download-monitor' ); ?></option>
281
  </select>
282
 
283
+ <input type="hidden" name="post_type" value="<?php echo PostType::KEY; ?>"/>
284
+ <input type="hidden" name="page" value="download-monitor-orders"/>
285
  <input type="submit" value="<?php _e( 'Filter', 'download-monitor' ); ?>" class="button"/>
286
 
287
  <?php
384
  */
385
  public function process_bulk_action() {
386
 
387
+ return;
388
+
389
  if ( 'delete' === $this->current_action() ) {
390
 
391
  // check nonce
395
 
396
  // check capability
397
  if ( ! current_user_can( 'dlm_manage_logs' ) ) {
398
+ wp_die( "You're not allowed to delete orders!" );
399
  }
400
 
401
  // check
src/Shop/Admin/Pages/Orders.php CHANGED
@@ -3,6 +3,7 @@
3
  namespace Never5\DownloadMonitor\Shop\Admin\Pages;
4
 
5
  use Never5\DownloadMonitor\Shop\Services\Services;
 
6
 
7
  class Orders {
8
 
@@ -18,7 +19,7 @@ class Orders {
18
  */
19
  public function add_admin_menu() {
20
  // Settings page
21
- add_submenu_page( 'edit.php?post_type=dlm_download', __( 'Orders', 'download-monitor' ), __( 'Orders', 'download-monitor' ), 'manage_options', 'download-monitor-orders', array(
22
  $this,
23
  'view'
24
  ) );
3
  namespace Never5\DownloadMonitor\Shop\Admin\Pages;
4
 
5
  use Never5\DownloadMonitor\Shop\Services\Services;
6
+ use Never5\DownloadMonitor\Shop\Util\PostType;
7
 
8
  class Orders {
9
 
19
  */
20
  public function add_admin_menu() {
21
  // Settings page
22
+ add_submenu_page( 'edit.php?post_type=' . PostType::KEY, __( 'Orders', 'download-monitor' ), __( 'Orders', 'download-monitor' ), 'manage_options', 'download-monitor-orders', array(
23
  $this,
24
  'view'
25
  ) );
src/Shop/Admin/ProductTableColumns.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Never5\DownloadMonitor\Shop\Admin;
4
+
5
+ use Never5\DownloadMonitor\Shop\Services\Services;
6
+ use Never5\DownloadMonitor\Shop\Util\PostType;
7
+
8
+ class ProductTableColumns {
9
+
10
+ /**
11
+ * Setup product columns
12
+ */
13
+ public function setup() {
14
+ add_filter( 'manage_edit-' . PostType::KEY . '_columns', array( $this, 'add_columns' ) );
15
+ add_action( 'manage_' . PostType::KEY . '_posts_custom_column', array( $this, 'column_data' ), 10, 2 );
16
+ add_filter( 'manage_edit-' . PostType::KEY . '_sortable_columns', array( $this, 'sortable_columns' ) );
17
+ }
18
+
19
+ /**
20
+ * columns function.
21
+ *
22
+ * @access public
23
+ *
24
+ * @param array $columns
25
+ *
26
+ * @return array
27
+ */
28
+ public function add_columns( $columns ) {
29
+ $columns = array();
30
+
31
+ $columns["cb"] = "<input type=\"checkbox\" />";
32
+ $columns["thumb"] = '<span>' . __( "Image", 'download-monitor' ) . '</span>';
33
+ $columns["title"] = __( "Title", 'download-monitor' );
34
+ $columns["price"] = __( "Price", 'download-monitor' );
35
+ $columns["date"] = __( "Date", 'download-monitor' );
36
+
37
+ return $columns;
38
+ }
39
+
40
+ /**
41
+ * custom_columns function.
42
+ *
43
+ * @access public
44
+ *
45
+ * @param string $column
46
+ * @param int $post_id
47
+ *
48
+ * @return void
49
+ */
50
+ public function column_data( $column, $post_id ) {
51
+
52
+ /** @var \Never5\DownloadMonitor\Shop\Product\Product $product */
53
+ try {
54
+ $product = Services::get()->service( 'product_repository' )->retrieve_single( $post_id );
55
+ } catch ( \Exception $exception ) {
56
+ return;
57
+ }
58
+
59
+ switch ( $column ) {
60
+ case "thumb" :
61
+ echo $product->get_image();
62
+ break;
63
+ case "price" :
64
+ echo dlm_format_money( $product->get_price() );
65
+ break;
66
+ }
67
+ }
68
+
69
+ /**
70
+ * sortable_columns function.
71
+ *
72
+ * @access public
73
+ *
74
+ * @param mixed $columns
75
+ *
76
+ * @return array
77
+ */
78
+ public function sortable_columns( $columns ) {
79
+ $custom = array(
80
+ 'price' => 'price'
81
+ );
82
+
83
+ return wp_parse_args( $custom, $columns );
84
+ }
85
+ }
src/Shop/Admin/WritePanels.php CHANGED
@@ -2,6 +2,10 @@
2
 
3
  namespace Never5\DownloadMonitor\Shop\Admin;
4
 
 
 
 
 
5
  class WritePanels {
6
 
7
  /**
@@ -9,45 +13,132 @@ class WritePanels {
9
  */
10
  public function setup() {
11
  add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
 
 
12
  }
13
 
14
  /**
15
  * Add the meta boxes
16
  */
17
  public function add_meta_box() {
18
- add_meta_box( 'download-monitor-shop', __( 'Shop', 'download-monitor' ), array(
19
  $this,
20
- 'display_shop'
21
- ), 'dlm_download', 'side', 'high' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  }
23
 
24
  /**
 
 
 
 
 
25
  * @param \WP_Post $post
 
 
26
  */
27
- public function display_shop( $post ) {
28
 
 
 
 
 
 
 
 
 
 
 
 
29
  try {
30
- /** @var \Never5\DownloadMonitor\Shop\DownloadProduct\DownloadProduct $download */
31
- $download = download_monitor()->service( 'download_repository' )->retrieve_single( $post->ID );
32
  } catch ( \Exception $e ) {
33
- $download = new \DLM_Download();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  }
35
 
36
  $price = "";
37
  $taxable = false;
38
  $tax_class = "";
39
- if ( $download->is_purchasable() ) {
40
 
41
- $price = $download->get_price_for_user_input();
42
- $taxable = $download->is_taxable();
43
- $tax_class = $download->get_tax_class();
44
- }
 
 
 
 
 
 
 
 
45
 
46
- download_monitor()->service( 'view_manager' )->display( 'meta-box/shop', array(
47
- 'download' => $download,
48
- 'price' => $price,
49
- 'taxable' => $taxable,
50
- 'tax_class' => $tax_class
 
 
51
  )
52
  );
53
  }
2
 
3
  namespace Never5\DownloadMonitor\Shop\Admin;
4
 
5
+ use Never5\DownloadMonitor\Shop\Product\Product;
6
+ use Never5\DownloadMonitor\Shop\Services\Services;
7
+ use Never5\DownloadMonitor\Shop\Util\PostType;
8
+
9
  class WritePanels {
10
 
11
  /**
13
  */
14
  public function setup() {
15
  add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
16
+ add_action( 'save_post', array( $this, 'save_post' ), 1, 2 );
17
+ add_action( 'dlm_product_save', array( $this, 'save_meta_boxes' ), 1, 2 );
18
  }
19
 
20
  /**
21
  * Add the meta boxes
22
  */
23
  public function add_meta_box() {
24
+ add_meta_box( 'download-monitor-product-info', __( 'Product Information', 'download-monitor' ), array(
25
  $this,
26
+ 'display_product_information'
27
+ ), PostType::KEY, 'normal', 'high' );
28
+ }
29
+
30
+ /**
31
+ * save_post function.
32
+ *
33
+ * @access public
34
+ *
35
+ * @param int $post_id
36
+ * @param \WP_Post $post
37
+ *
38
+ * @return void
39
+ */
40
+ public function save_post( $post_id, $post ) {
41
+ if ( empty( $post_id ) || empty( $post ) || empty( $_POST ) ) {
42
+ return;
43
+ }
44
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
45
+ return;
46
+ }
47
+ if ( is_int( wp_is_post_revision( $post ) ) ) {
48
+ return;
49
+ }
50
+ if ( is_int( wp_is_post_autosave( $post ) ) ) {
51
+ return;
52
+ }
53
+ if ( empty( $_POST['dlm_product_nonce'] ) || ! wp_verify_nonce( $_POST['dlm_product_nonce'], 'save_meta_data' ) ) {
54
+ return;
55
+ }
56
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
57
+ return;
58
+ }
59
+ if ( $post->post_type != PostType::KEY ) {
60
+ return;
61
+ }
62
+
63
+ // unset nonce because it's only valid of 1 post
64
+ unset( $_POST['dlm_product_nonce'] );
65
+
66
+ do_action( 'dlm_product_save', $post_id, $post );
67
  }
68
 
69
  /**
70
+ * save function.
71
+ *
72
+ * @access public
73
+ *
74
+ * @param int $post_id
75
  * @param \WP_Post $post
76
+ *
77
+ * @return void
78
  */
79
+ public function save_meta_boxes( $post_id, $post ) {
80
 
81
+ /**
82
+ * Fetch old download object
83
+ * There are certain props we don't need to manually persist here because WP does this automatically for us.
84
+ * These props are:
85
+ * - Product Title
86
+ * - Product Status
87
+ * - Product Author
88
+ * - Product Description & Excerpt
89
+ *
90
+ */
91
+ /** @var Product $product */
92
  try {
93
+ $product = Services::get()->service( 'product_repository' )->retrieve_single( $post_id );
 
94
  } catch ( \Exception $e ) {
95
+ // product not found, no point in continuing
96
+ return;
97
+ }
98
+
99
+ $product->set_price_from_user_input( $_POST['_dlm_price'] );
100
+ $product->set_download_ids( $_POST['_dlm_downloads'] );
101
+
102
+ // persist download
103
+ Services::get()->service( 'product_repository' )->persist( $product );
104
+ }
105
+
106
+ /**
107
+ * @param \WP_Post $post
108
+ */
109
+ public function display_product_information( $post ) {
110
+
111
+ try {
112
+ /** @var Product $product */
113
+ $product = Services::get()->service( 'product_repository' )->retrieve_single( $post->ID );
114
+ } catch ( \Exception $e ) {
115
+ $product = Services::get()->service( 'product_factory' )->make();
116
  }
117
 
118
  $price = "";
119
  $taxable = false;
120
  $tax_class = "";
 
121
 
122
+ $price = $product->get_price_for_user_input();
123
+
124
+ /**
125
+ * Fetch downloads
126
+ */
127
+ /** @todo fetch actual downloads */
128
+ $downloads = download_monitor()->service( 'download_repository' )->retrieve( array(
129
+ 'orderby' => 'title',
130
+ 'order' => 'ASC'
131
+ ) );
132
+
133
+ wp_nonce_field( 'save_meta_data', 'dlm_product_nonce' );
134
 
135
+ download_monitor()->service( 'view_manager' )->display( 'meta-box/product-information', array(
136
+ 'product' => $product,
137
+ 'price' => $price,
138
+ 'taxable' => $taxable,
139
+ 'tax_class' => $tax_class,
140
+ 'downloads' => $downloads,
141
+ 'current_download_ids' => $product->get_download_ids()
142
  )
143
  );
144
  }
src/Shop/Cart/Cart.php CHANGED
@@ -56,7 +56,7 @@ class Cart {
56
  if ( count( $items ) > 0 ) {
57
  /** @var Item\Item $item */
58
  foreach ( $items as $i ) {
59
- if ( $i->get_download_id() === $item->get_download_id() ) {
60
  return true;
61
  }
62
  }
56
  if ( count( $items ) > 0 ) {
57
  /** @var Item\Item $item */
58
  foreach ( $items as $i ) {
59
+ if ( $i->get_product_id() === $item->get_product_id() ) {
60
  return true;
61
  }
62
  }
src/Shop/Cart/Item/Factory.php CHANGED
@@ -2,39 +2,42 @@
2
 
3
  namespace Never5\DownloadMonitor\Shop\Cart\Item;
4
 
 
 
5
  class Factory {
6
 
7
 
8
  /**
9
  * Make Item for given Download ID
10
  *
11
- * @param int $download_id
12
  *
13
  * @return Item
14
  * @throws \Exception
15
  */
16
- public function make( $download_id ) {
17
 
18
  /**
19
  * Fetch the download
20
  *
21
- * @var \Never5\DownloadMonitor\Shop\DownloadProduct\DownloadProduct $download
22
  */
23
- $download = download_monitor()->service( 'download_repository' )->retrieve_single( $download_id );
24
 
25
- // don't continue if this download isn't purchasable
26
- if ( ! $download->is_purchasable() ) {
27
- throw new \Exception( 'Download not purchasable' );
28
  }
29
 
 
30
  // build item
31
  $item = new Item();
32
- $item->set_download_id( $download_id );
33
  $item->set_qty( 1 );
34
- $item->set_label( $download->get_title() );
35
- $item->set_subtotal( $download->get_price() );
36
- $item->set_tax_total( 0 ); /** @todo [TAX] Implement taxes */
37
- $item->set_total( $download->get_price() );
 
38
 
39
  return $item;
40
  }
2
 
3
  namespace Never5\DownloadMonitor\Shop\Cart\Item;
4
 
5
+ use Never5\DownloadMonitor\Shop\Services\Services;
6
+
7
  class Factory {
8
 
9
 
10
  /**
11
  * Make Item for given Download ID
12
  *
13
+ * @param int $product_id
14
  *
15
  * @return Item
16
  * @throws \Exception
17
  */
18
+ public function make( $product_id ) {
19
 
20
  /**
21
  * Fetch the download
22
  *
23
+ * @var \Never5\DownloadMonitor\Shop\Product\Product $product
24
  */
25
+ $product = Services::get()->service( 'product_repository' )->retrieve_single( $product_id );
26
 
27
+ if ( ! in_array( $product->get_status(), array( 'publish' ) ) ) {
28
+ throw new \Exception( 'Product not purchasable' );
 
29
  }
30
 
31
+
32
  // build item
33
  $item = new Item();
34
+ $item->set_product_id( $product_id );
35
  $item->set_qty( 1 );
36
+ $item->set_label( $product->get_title() );
37
+ $item->set_subtotal( $product->get_price() );
38
+ $item->set_tax_total( 0 );
39
+ /** @todo [TAX] Implement taxes */
40
+ $item->set_total( $product->get_price() );
41
 
42
  return $item;
43
  }
src/Shop/Cart/Item/Item.php CHANGED
@@ -5,7 +5,7 @@ namespace Never5\DownloadMonitor\Shop\Cart\Item;
5
  class Item {
6
 
7
  /** @var int */
8
- private $download_id;
9
 
10
  /** @var string */
11
  private $label;
@@ -25,15 +25,15 @@ class Item {
25
  /**
26
  * @return int
27
  */
28
- public function get_download_id() {
29
- return $this->download_id;
30
  }
31
 
32
  /**
33
- * @param int $download_id
34
  */
35
- public function set_download_id( $download_id ) {
36
- $this->download_id = $download_id;
37
  }
38
 
39
  /**
5
  class Item {
6
 
7
  /** @var int */
8
+ private $product_id;
9
 
10
  /** @var string */
11
  private $label;
25
  /**
26
  * @return int
27
  */
28
+ public function get_product_id() {
29
+ return $this->product_id;
30
  }
31
 
32
  /**
33
+ * @param int $product_id
34
  */
35
+ public function set_product_id( $product_id ) {
36
+ $this->product_id = $product_id;
37
  }
38
 
39
  /**
src/Shop/Cart/Manager.php CHANGED
@@ -32,7 +32,7 @@ class Manager {
32
  foreach ( $session_items as $session_item ) {
33
 
34
  try {
35
- $item = $item_factory->make( $session_item->get_download_id() );
36
  $item->set_qty( $session_item->get_qty() );
37
 
38
  // add item to items array
@@ -90,7 +90,7 @@ class Manager {
90
 
91
  /** @var Item\Item $cart_item */
92
  foreach ( $cart_items as $cart_item ) {
93
- $session_items[] = $session_item_factory->make( $cart_item->get_download_id(), $cart_item->get_qty() );
94
  }
95
  }
96
  $session->set_items( $session_items );
@@ -155,15 +155,15 @@ class Manager {
155
  /**
156
  * Add a download to cart
157
  *
158
- * @param int $download_id
159
  * @param int $qty
160
  */
161
- public function add_to_cart( $download_id, $qty ) {
162
 
163
  try {
164
 
165
  /** @var Item\Item $item */
166
- $item = Services::get()->service( 'cart_item_factory' )->make( $download_id );
167
  $item->set_qty( $qty );
168
 
169
  // add item to cart
@@ -185,9 +185,9 @@ class Manager {
185
  /**
186
  * Remove a download from cart
187
  *
188
- * @param int $download_id
189
  */
190
- public function remove_from_cart( $download_id ) {
191
 
192
  // get cart and items
193
  $cart = $this->get_cart();
@@ -199,7 +199,7 @@ class Manager {
199
  /** @var int $ik */
200
  /** @var Item\Item $iv */
201
  foreach ( $items as $ik => $iv ) {
202
- if ( $iv->get_download_id() == $download_id ) {
203
  unset( $items[ $ik ] );
204
  }
205
  }
32
  foreach ( $session_items as $session_item ) {
33
 
34
  try {
35
+ $item = $item_factory->make( $session_item->get_product_id() );
36
  $item->set_qty( $session_item->get_qty() );
37
 
38
  // add item to items array
90
 
91
  /** @var Item\Item $cart_item */
92
  foreach ( $cart_items as $cart_item ) {
93
+ $session_items[] = $session_item_factory->make( $cart_item->get_product_id(), $cart_item->get_qty() );
94
  }
95
  }
96
  $session->set_items( $session_items );
155
  /**
156
  * Add a download to cart
157
  *
158
+ * @param int $product_id
159
  * @param int $qty
160
  */
161
+ public function add_to_cart( $product_id, $qty ) {
162
 
163
  try {
164
 
165
  /** @var Item\Item $item */
166
+ $item = Services::get()->service( 'cart_item_factory' )->make( $product_id );
167
  $item->set_qty( $qty );
168
 
169
  // add item to cart
185
  /**
186
  * Remove a download from cart
187
  *
188
+ * @param int $product_id
189
  */
190
+ public function remove_from_cart( $product_id ) {
191
 
192
  // get cart and items
193
  $cart = $this->get_cart();
199
  /** @var int $ik */
200
  /** @var Item\Item $iv */
201
  foreach ( $items as $ik => $iv ) {
202
+ if ( $iv->get_product_id() == $product_id ) {
203
  unset( $items[ $ik ] );
204
  }
205
  }
src/Shop/Checkout/PaymentGateway/PayPal/ExecutePaymentListener.php CHANGED
@@ -134,8 +134,8 @@ class ExecutePaymentListener {
134
  * @param string $order_hash
135
  */
136
  private function execute_failed( $order_id, $order_hash ) {
137
- echo 'failed';
138
- exit();
139
  wp_redirect( $this->gateway->get_failed_url( $order_id, $order_hash ), 302 );
140
  exit;
141
  }
134
  * @param string $order_hash
135
  */
136
  private function execute_failed( $order_id, $order_hash ) {
137
+ // echo 'failed';
138
+ // exit();
139
  wp_redirect( $this->gateway->get_failed_url( $order_id, $order_hash ), 302 );
140
  exit;
141
  }
src/Shop/Checkout/PaymentGateway/PayPal/PayPalGateway.php CHANGED
@@ -302,7 +302,7 @@ class PayPalGateway extends PaymentGateway\PaymentGateway {
302
  $item->setName( $order_item->get_label() )
303
  ->setCurrency( $currency )
304
  ->setQuantity( $order_item->get_qty() )
305
- ->setSku( $order_item->get_download_id() )
306
  ->setPrice( $this->cents_to_full( $order_item->get_subtotal() ) );
307
  $items[] = $item;
308
  }
302
  $item->setName( $order_item->get_label() )
303
  ->setCurrency( $currency )
304
  ->setQuantity( $order_item->get_qty() )
305
+ ->setSku( $order_item->get_product_id() )
306
  ->setPrice( $this->cents_to_full( $order_item->get_subtotal() ) );
307
  $items[] = $item;
308
  }
src/Shop/DownloadProduct/DownloadProduct.php DELETED
@@ -1,118 +0,0 @@
1
- <?php
2
-
3
- namespace Never5\DownloadMonitor\Shop\DownloadProduct;
4
-
5
- class DownloadProduct extends \DLM_Download {
6
-
7
- /**
8
- * @var int Price of DownloadProduct in cents
9
- */
10
- private $price;
11
-
12
- /** @var bool */
13
- private $taxable;
14
-
15
- /** @var string */
16
- private $tax_class;
17
-
18
- /**
19
- * @return int
20
- */
21
- public function get_price() {
22
- return $this->price;
23
- }
24
-
25
- /**
26
- * @param int $price
27
- */
28
- public function set_price( $price ) {
29
- $this->price = $price;
30
- }
31
-
32
- /**
33
- * Set the price from user input.
34
- * Format the input so the decimal separator will become a dot (.)
35
- * Multiply input by 100 because we store prices in cents
36
- *
37
- * @param string $user_input
38
- */
39
- public function set_price_from_user_input( $user_input ) {
40
-
41
- $price = $user_input;
42
-
43
- // if the thousand sep is not a dot, it's a comma. In this case remove all dots, then replace
44
- if ( '.' !== download_monitor()->service( 'settings' )->get_option( 'decimal_separator' ) ) {
45
- $price = str_replace( ".", "", $price );
46
- $price = str_replace( ",", ".", $price );
47
- } else {
48
- // thousand sep is dot. Leave the dot, remove the commas
49
- $price = str_replace( ",", "", $price );
50
- }
51
-
52
- // convert to cents
53
- $price = $price * 100;
54
-
55
- $this->set_price( $price );
56
- }
57
-
58
- /**
59
- * Return the price ready to be used in a user input field
60
- *
61
- * @return string
62
- */
63
- public function get_price_for_user_input() {
64
- $decimal_sep = download_monitor()->service( 'settings' )->get_option( 'decimal_separator' );
65
- $thousand_sep = ( ( '.' === $decimal_sep ) ? ',' : '.' );
66
- $price = ( $this->get_price() / 100 );
67
-
68
- return number_format( $price, 2, $decimal_sep, $thousand_sep );
69
- }
70
-
71
- /**
72
- * @return bool
73
- */
74
- public function is_taxable() {
75
- return $this->taxable;
76
- }
77
-
78
- /**
79
- * @param bool $taxable
80
- */
81
- public function set_taxable( $taxable ) {
82
- $this->taxable = $taxable;
83
- }
84
-
85
- /**
86
- * @return string
87
- */
88
- public function get_tax_class() {
89
- return $this->tax_class;
90
- }
91
-
92
- /**
93
- * @param string $tax_class
94
- */
95
- public function set_tax_class( $tax_class ) {
96
- $this->tax_class = $tax_class;
97
- }
98
-
99
- /**
100
- * Get a secure download link for this download linked to given order
101
- *
102
- * @param \Never5\DownloadMonitor\Shop\Order\Order $order
103
- *
104
- * @return string
105
- */
106
- public function get_secure_download_link( $order ) {
107
- $download_url = $this->get_the_download_link();
108
-
109
- $download_url = add_query_arg( array( 'order_id' => $order->get_id(),
110
- 'order_hash' => $order->get_hash()
111
- ), $download_url );
112
-
113
- $download_url = apply_filters( 'dlm_secure_download_link', $download_url, $this, $order );
114
-
115
- return $download_url;
116
- }
117
-
118
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Shop/Email/VarParser.php CHANGED
@@ -2,6 +2,8 @@
2
 
3
  namespace Never5\DownloadMonitor\Shop\Email;
4
 
 
 
5
  class VarParser {
6
 
7
  /**
@@ -45,27 +47,45 @@ class VarParser {
45
 
46
  foreach ( $order_items as $order_item ) {
47
 
48
- $download = null;
49
- $version_label = "-";
50
- $download_button_html = __( 'Download is no longer available', 'download-monitor' );
51
- $download_url = "";
52
-
53
  try {
54
- /** @var \Never5\DownloadMonitor\Shop\DownloadProduct\DownloadProduct $download */
55
- $download = download_monitor()->service( 'download_repository' )->retrieve_single( $order_item->get_download_id() );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
- $version_label = $download->get_version()->get_version();
58
- $download_button_html = "<a href='" . $download->get_secure_download_link( $order ) . "' class='dlm-download-button'>" . __( 'Download File', 'download-monitor' ) . "</a>";
59
- $download_url = $download->get_secure_download_link( $order );
60
  } catch ( \Exception $e ) {
61
  }
62
 
63
- $html_items[] = array(
64
- 'label' => $order_item->get_label(),
65
- 'version' => $version_label,
66
- 'button' => $download_button_html,
67
- 'download_url' => $download_url
68
- );
69
  }
70
 
71
  }
@@ -129,7 +149,7 @@ class VarParser {
129
 
130
  ob_start();
131
  download_monitor()->service( 'template_handler' )->get_template_part( 'shop/email/elements/downloads-table', '', '', array(
132
- 'items' => $this->build_simplified_order_items_array( $order )
133
  ) );
134
  $output = ob_get_clean();
135
 
@@ -147,7 +167,7 @@ class VarParser {
147
  private function generate_download_table_plain( $order ) {
148
  ob_start();
149
  download_monitor()->service( 'template_handler' )->get_template_part( 'shop/email/elements/downloads-table-plain', '', '', array(
150
- 'items' => $this->build_simplified_order_items_array( $order )
151
  ) );
152
  $output = ob_get_clean();
153
 
2
 
3
  namespace Never5\DownloadMonitor\Shop\Email;
4
 
5
+ use Never5\DownloadMonitor\Shop\Services\Services;
6
+
7
  class VarParser {
8
 
9
  /**
47
 
48
  foreach ( $order_items as $order_item ) {
49
 
 
 
 
 
 
50
  try {
51
+ /** @var \Never5\DownloadMonitor\Shop\Product\Product $product */
52
+ $product = Services::get()->service( 'product_repository' )->retrieve_single( $order_item->get_product_id() );
53
+
54
+ $html_item = array(
55
+ 'label' => $product->get_title(),
56
+ 'downloads' => array()
57
+ );
58
+
59
+ $downloads = $product->get_downloads();
60
+ if ( ! empty( $downloads ) ) {
61
+
62
+ foreach ( $downloads as $download ) {
63
+
64
+ $version_label = "-";
65
+ $download_button_html = __( 'Download is no longer available', 'download-monitor' );
66
+ $download_url = "";
67
+
68
+ if ( $download->exists() ) {
69
+ $version_label = $download->get_version()->get_version();
70
+ $download_button_html = "<a href='" . $product->get_secure_download_link( $order, $download ) . "' class='dlm-download-button'>" . __( 'Download File', 'download-monitor' ) . "</a>";
71
+ $download_url = $product->get_secure_download_link( $order, $download );
72
+ }
73
+
74
+ $html_item['downloads'][] = array(
75
+ 'label' => $download->get_title(),
76
+ 'version' => $version_label,
77
+ 'button' => $download_button_html,
78
+ 'download_url' => $download_url
79
+ );
80
+ }
81
+ }
82
+
83
+ $html_items[] = $html_item;
84
+
85
 
 
 
 
86
  } catch ( \Exception $e ) {
87
  }
88
 
 
 
 
 
 
 
89
  }
90
 
91
  }
149
 
150
  ob_start();
151
  download_monitor()->service( 'template_handler' )->get_template_part( 'shop/email/elements/downloads-table', '', '', array(
152
+ 'products' => $this->build_simplified_order_items_array( $order )
153
  ) );
154
  $output = ob_get_clean();
155
 
167
  private function generate_download_table_plain( $order ) {
168
  ob_start();
169
  download_monitor()->service( 'template_handler' )->get_template_part( 'shop/email/elements/downloads-table-plain', '', '', array(
170
+ 'products' => $this->build_simplified_order_items_array( $order )
171
  ) );
172
  $output = ob_get_clean();
173
 
src/Shop/Order/Manager.php CHANGED
@@ -27,7 +27,7 @@ class Manager {
27
 
28
  $order_item->set_label( $cart_item->get_label() );
29
  $order_item->set_qty( $cart_item->get_qty() );
30
- $order_item->set_download_id( $cart_item->get_download_id() );
31
  $order_item->set_subtotal( $cart_item->get_subtotal() );
32
  $order_item->set_tax_total( $cart_item->get_tax_total() );
33
  /** @todo set tax class */
27
 
28
  $order_item->set_label( $cart_item->get_label() );
29
  $order_item->set_qty( $cart_item->get_qty() );
30
+ $order_item->set_product_id( $cart_item->get_product_id() );
31
  $order_item->set_subtotal( $cart_item->get_subtotal() );
32
  $order_item->set_tax_total( $cart_item->get_tax_total() );
33
  /** @todo set tax class */
src/Shop/Order/OrderItem.php CHANGED
@@ -14,7 +14,7 @@ class OrderItem {
14
  private $qty;
15
 
16
  /** @var int */
17
- private $download_id;
18
 
19
  /** @var string */
20
  private $tax_class;
@@ -73,15 +73,15 @@ class OrderItem {
73
  /**
74
  * @return int
75
  */
76
- public function get_download_id() {
77
- return $this->download_id;
78
  }
79
 
80
  /**
81
- * @param int $download_id
82
  */
83
- public function set_download_id( $download_id ) {
84
- $this->download_id = $download_id;
85
  }
86
 
87
  /**
14
  private $qty;
15
 
16
  /** @var int */
17
+ private $product_id;
18
 
19
  /** @var string */
20
  private $tax_class;
73
  /**
74
  * @return int
75
  */
76
+ public function get_product_id() {
77
+ return $this->product_id;
78
  }
79
 
80
  /**
81
+ * @param int $product_id
82
  */
83
+ public function set_product_id( $product_id ) {
84
+ $this->product_id = $product_id;
85
  }
86
 
87
  /**
src/Shop/Order/WordPressRepository.php CHANGED
@@ -62,7 +62,7 @@ class WordPressRepository implements Repository {
62
  $order_item->set_id( $db_item->id );
63
  $order_item->set_label( $db_item->label );
64
  $order_item->set_qty( $db_item->qty );
65
- $order_item->set_download_id( $db_item->download_id );
66
  $order_item->set_subtotal( $db_item->subtotal );
67
  $order_item->set_tax_class( $db_item->tax_class );
68
  $order_item->set_tax_total( $db_item->tax_total );
@@ -83,6 +83,7 @@ class WordPressRepository implements Repository {
83
  * @param Order $order
84
  *
85
  * @return Order
 
86
  */
87
  private function add_transactions_to_order( $order ) {
88
  global $wpdb;
@@ -446,14 +447,14 @@ class WordPressRepository implements Repository {
446
  $r = $wpdb->insert(
447
  $wpdb->prefix . 'dlm_order_item',
448
  array(
449
- 'order_id' => $order->get_id(),
450
- 'label' => $order_item->get_label(),
451
- 'qty' => $order_item->get_qty(),
452
- 'download_id' => $order_item->get_download_id(),
453
- 'tax_class' => $order_item->get_tax_class(),
454
- 'tax_total' => $order_item->get_tax_total(),
455
- 'subtotal' => $order_item->get_subtotal(),
456
- 'total' => $order_item->get_total()
457
  ),
458
  array(
459
  '%d',
@@ -478,14 +479,14 @@ class WordPressRepository implements Repository {
478
  $r = $wpdb->update(
479
  $wpdb->prefix . 'dlm_order_item',
480
  array(
481
- 'order_id' => $order->get_id(),
482
- 'label' => $order_item->get_label(),
483
- 'qty' => $order_item->get_qty(),
484
- 'download_id' => $order_item->get_download_id(),
485
- 'tax_class' => $order_item->get_tax_class(),
486
- 'tax_total' => $order_item->get_tax_total(),
487
- 'subtotal' => $order_item->get_subtotal(),
488
- 'total' => $order_item->get_total()
489
  ),
490
  array( 'id' => $order_item_id ),
491
  array(
62
  $order_item->set_id( $db_item->id );
63
  $order_item->set_label( $db_item->label );
64
  $order_item->set_qty( $db_item->qty );
65
+ $order_item->set_product_id( $db_item->product_id );
66
  $order_item->set_subtotal( $db_item->subtotal );
67
  $order_item->set_tax_class( $db_item->tax_class );
68
  $order_item->set_tax_total( $db_item->tax_total );
83
  * @param Order $order
84
  *
85
  * @return Order
86
+ * @throws \Exception
87
  */
88
  private function add_transactions_to_order( $order ) {
89
  global $wpdb;
447
  $r = $wpdb->insert(
448
  $wpdb->prefix . 'dlm_order_item',
449
  array(
450
+ 'order_id' => $order->get_id(),
451
+ 'label' => $order_item->get_label(),
452
+ 'qty' => $order_item->get_qty(),
453
+ 'product_id' => $order_item->get_product_id(),
454
+ 'tax_class' => $order_item->get_tax_class(),
455
+ 'tax_total' => $order_item->get_tax_total(),
456
+ 'subtotal' => $order_item->get_subtotal(),
457
+ 'total' => $order_item->get_total()
458
  ),
459
  array(
460
  '%d',
479
  $r = $wpdb->update(
480
  $wpdb->prefix . 'dlm_order_item',
481
  array(
482
+ 'order_id' => $order->get_id(),
483
+ 'label' => $order_item->get_label(),
484
+ 'qty' => $order_item->get_qty(),
485
+ 'product_id' => $order_item->get_product_id(),
486
+ 'tax_class' => $order_item->get_tax_class(),
487
+ 'tax_total' => $order_item->get_tax_total(),
488
+ 'subtotal' => $order_item->get_subtotal(),
489
+ 'total' => $order_item->get_total()
490
  ),
491
  array( 'id' => $order_item_id ),
492
  array(
src/Shop/Product/Factory.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Never5\DownloadMonitor\Shop\Product;
4
+
5
+ class Factory {
6
+
7
+ /**
8
+ *
9
+ * @return Product
10
+ */
11
+ public function make() {
12
+
13
+ $product = new Product();
14
+
15
+ return $product;
16
+ }
17
+
18
+ }
src/Shop/Product/Product.php ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Never5\DownloadMonitor\Shop\Product;
4
+
5
+ class Product {
6
+
7
+ /** @var int */
8
+ private $id;
9
+
10
+ /** @var string */
11
+ private $title;
12
+
13
+ /** @var string */
14
+ private $content;
15
+
16
+ /** @var string */
17
+ private $status;
18
+
19
+ /** @var int */
20
+ private $author;
21
+
22
+ /** @var string */
23
+ private $excerpt;
24
+
25
+ /**
26
+ * @var int Price of DownloadProduct in cents
27
+ */
28
+ private $price;
29
+
30
+ /** @var bool */
31
+ private $taxable;
32
+
33
+ /** @var string */
34
+ private $tax_class;
35
+
36
+ /** @var int[] array array with download ids */
37
+ private $download_ids = array();
38
+
39
+ /** @var \DLM_Download[] */
40
+ private $downloads_cache = null;
41
+
42
+ /**
43
+ * @return int
44
+ */
45
+ public function get_id() {
46
+ return $this->id;
47
+ }
48
+
49
+ /**
50
+ * @param int $id
51
+ */
52
+ public function set_id( $id ) {
53
+ $this->id = $id;
54
+ }
55
+
56
+ /**
57
+ * @return string
58
+ */
59
+ public function get_title() {
60
+ return $this->title;
61
+ }
62
+
63
+ /**
64
+ * @param string $title
65
+ */
66
+ public function set_title( $title ) {
67
+ $this->title = $title;
68
+ }
69
+
70
+ /**
71
+ * @return string
72
+ */
73
+ public function get_content() {
74
+ return $this->content;
75
+ }
76
+
77
+ /**
78
+ * @param string $content
79
+ */
80
+ public function set_content( $content ) {
81
+ $this->content = $content;
82
+ }
83
+
84
+ /**
85
+ * @return string
86
+ */
87
+ public function get_status() {
88
+ return $this->status;
89
+ }
90
+
91
+ /**
92
+ * @param string $status
93
+ */
94
+ public function set_status( $status ) {
95
+ $this->status = $status;
96
+ }
97
+
98
+ /**
99
+ * @return int
100
+ */
101
+ public function get_author() {
102
+ return $this->author;
103
+ }
104
+
105
+ /**
106
+ * @param int $author
107
+ */
108
+ public function set_author( $author ) {
109
+ $this->author = $author;
110
+ }
111
+
112
+ /**
113
+ * @return string
114
+ */
115
+ public function get_excerpt() {
116
+ return $this->excerpt;
117
+ }
118
+
119
+ /**
120
+ * @param string $excerpt
121
+ */
122
+ public function set_excerpt( $excerpt ) {
123
+ $this->excerpt = $excerpt;
124
+ }
125
+
126
+ /**
127
+ * @return int
128
+ */
129
+ public function get_price() {
130
+ return $this->price;
131
+ }
132
+
133
+ /**
134
+ * @param int $price
135
+ */
136
+ public function set_price( $price ) {
137
+ $this->price = $price;
138
+ }
139
+
140
+ /**
141
+ * Set the price from user input.
142
+ * Format the input so the decimal separator will become a dot (.)
143
+ * Multiply input by 100 because we store prices in cents
144
+ *
145
+ * @param string $user_input
146
+ */
147
+ public function set_price_from_user_input( $user_input ) {
148
+
149
+ $price = $user_input;
150
+
151
+ // if the thousand sep is not a dot, it's a comma. In this case remove all dots, then replace
152
+ if ( '.' !== download_monitor()->service( 'settings' )->get_option( 'decimal_separator' ) ) {
153
+ $price = str_replace( ".", "", $price );
154
+ $price = str_replace( ",", ".", $price );
155
+ } else {
156
+ // thousand sep is dot. Leave the dot, remove the commas
157
+ $price = str_replace( ",", "", $price );
158
+ }
159
+
160
+ // convert to cents
161
+ $price = $price * 100;
162
+
163
+ $this->set_price( $price );
164
+ }
165
+
166
+ /**
167
+ * Return the price ready to be used in a user input field
168
+ *
169
+ * @return string
170
+ */
171
+ public function get_price_for_user_input() {
172
+ $decimal_sep = download_monitor()->service( 'settings' )->get_option( 'decimal_separator' );
173
+ $thousand_sep = ( ( '.' === $decimal_sep ) ? ',' : '.' );
174
+ $price = ( $this->get_price() / 100 );
175
+
176
+ return number_format( $price, 2, $decimal_sep, $thousand_sep );
177
+ }
178
+
179
+ /**
180
+ * @return bool
181
+ */
182
+ public function is_taxable() {
183
+ return $this->taxable;
184
+ }
185
+
186
+ /**
187
+ * @param bool $taxable
188
+ */
189
+ public function set_taxable( $taxable ) {
190
+ $this->taxable = $taxable;
191
+ }
192
+
193
+ /**
194
+ * @return string
195
+ */
196
+ public function get_tax_class() {
197
+ return $this->tax_class;
198
+ }
199
+
200
+ /**
201
+ * @param string $tax_class
202
+ */
203
+ public function set_tax_class( $tax_class ) {
204
+ $this->tax_class = $tax_class;
205
+ }
206
+
207
+ /**
208
+ * Get a secure download link for this download linked to given order
209
+ *
210
+ * @param \Never5\DownloadMonitor\Shop\Order\Order $order
211
+ * @param \DLM_Download $download
212
+ *
213
+ * @return string
214
+ */
215
+ public function get_secure_download_link( $order, $download ) {
216
+ $download_url = $download->get_the_download_link();
217
+
218
+ $download_url = add_query_arg( array(
219
+ 'order_id' => $order->get_id(),
220
+ 'order_hash' => $order->get_hash()
221
+ ), $download_url );
222
+
223
+ $download_url = apply_filters( 'dlm_secure_download_link', $download_url, $this, $order );
224
+
225
+ return $download_url;
226
+ }
227
+
228
+ /**
229
+ * @return int[]
230
+ */
231
+ public function get_download_ids() {
232
+ return $this->download_ids;
233
+ }
234
+
235
+ /**
236
+ * @param int[] $download_ids
237
+ */
238
+ public function set_download_ids( $download_ids ) {
239
+ $this->download_ids = $download_ids;
240
+ $this->reset_download_cache();
241
+ }
242
+
243
+ /**
244
+ * Get download objects linked to this product.
245
+ * We use $this->download_ids and cache the downloads in this object
246
+ *
247
+ * @return \DLM_Download[]
248
+ */
249
+ public function get_downloads() {
250
+ if ( null === $this->downloads_cache ) {
251
+ $downloads = download_monitor()->service( 'download_repository' )->retrieve(
252
+ array(
253
+ 'post__in' => $this->get_download_ids()
254
+ )
255
+ );
256
+ $this->downloads_cache = $downloads;
257
+ }
258
+
259
+ return $this->downloads_cache;
260
+ }
261
+
262
+ /**
263
+ * Resets internal download cache
264
+ */
265
+ public function reset_download_cache() {
266
+ $this->downloads_cache = null;
267
+ }
268
+
269
+ /**
270
+ * Get image of this product
271
+ *
272
+ * @return string
273
+ */
274
+ public function get_image() {
275
+ if ( has_post_thumbnail( $this->id ) ) {
276
+ return get_the_post_thumbnail( $this->id, 'full' );
277
+ } else {
278
+ return '<img alt="Placeholder" class="wp-post-image" src="' . apply_filters( 'dlm_placeholder_image_src', download_monitor()->get_plugin_url() . '/assets/images/placeholder.png', $this->id, $this ) . '" />';
279
+ }
280
+ }
281
+ }
src/Shop/Product/Repository.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Never5\DownloadMonitor\Shop\Product;
4
+
5
+ interface Repository {
6
+
7
+ /**
8
+ * Retrieve items
9
+ *
10
+ * @param array $filters
11
+ * @param int $limit
12
+ * @param int $offset
13
+ *
14
+ * @return array<Product>
15
+ */
16
+ public function retrieve( $filters=array(), $limit=0, $offset=0 );
17
+
18
+ /**
19
+ * Retrieve single item
20
+ *
21
+ * @param int $id
22
+ *
23
+ * @return Product
24
+ */
25
+ public function retrieve_single( $id );
26
+
27
+ /**
28
+ * Returns number of rows for given filters
29
+ *
30
+ * @param array $filters
31
+ *
32
+ * @return int
33
+ */
34
+ public function num_rows( $filters=array() );
35
+
36
+ /**
37
+ * @param Product $product
38
+ *
39
+ * @return bool
40
+ */
41
+ public function persist( $product );
42
+ }
src/Shop/Product/WordPressRepository.php ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Never5\DownloadMonitor\Shop\Product;
4
+
5
+ use Never5\DownloadMonitor\Shop\Services\Services;
6
+ use Never5\DownloadMonitor\Shop\Util\PostType;
7
+
8
+ class WordPressRepository implements Repository {
9
+
10
+ /**
11
+ * Filter query arguments for download WP_Query queries
12
+ *
13
+ * @param array $args
14
+ * @param int $limit
15
+ * @param int $offset
16
+ *
17
+ * @return array
18
+ */
19
+ private function filter_query_args( $args = array(), $limit = 0, $offset = 0 ) {
20
+
21
+ // limit must be int, not abs
22
+ $limit = intval( $limit );
23
+
24
+ // most be absint
25
+ $offset = absint( $offset );
26
+
27
+ // start with removing reserved keys
28
+ unset( $args['post_type'] );
29
+ unset( $args['posts_per_page'] );
30
+ unset( $args['offset'] );
31
+ unset( $args['paged'] );
32
+ unset( $args['nopaging'] );
33
+
34
+ // setup our reserved keys
35
+ $args['post_type'] = PostType::KEY;
36
+ $args['posts_per_page'] = - 1;
37
+
38
+ // set limit if set
39
+ if ( $limit > 0 ) {
40
+ $args['posts_per_page'] = $limit;
41
+ }
42
+
43
+ // set offset if set
44
+ if ( $offset > 0 ) {
45
+ $args['offset'] = $offset;
46
+ }
47
+
48
+ return $args;
49
+ }
50
+
51
+ /**
52
+ * Returns number of rows for given filters
53
+ *
54
+ * @param array $filters
55
+ *
56
+ * @return int
57
+ */
58
+ public function num_rows( $filters = array() ) {
59
+ $q = new \WP_Query();
60
+ $q->query( $this->filter_query_args( $filters ) );
61
+
62
+ return $q->found_posts;
63
+ }
64
+
65
+ /**
66
+ * Retrieve single download
67
+ *
68
+ * @param int $id
69
+ *
70
+ * @return Product
71
+ * @throws \Exception
72
+ */
73
+ public function retrieve_single( $id ) {
74
+ $downloads = $this->retrieve( array( 'p' => absint( $id ) ) );
75
+
76
+ if ( count( $downloads ) != 1 ) {
77
+ throw new \Exception( "Product not found" );
78
+ }
79
+
80
+ return array_shift( $downloads );
81
+ }
82
+
83
+ /**
84
+ * Retrieve products
85
+ *
86
+ * @param array $filters
87
+ * @param int $limit
88
+ * @param int $offset
89
+ *
90
+ * @return array<Product>
91
+ */
92
+ public function retrieve( $filters = array(), $limit = 0, $offset = 0 ) {
93
+
94
+ $items = array();
95
+
96
+ $q = new \WP_Query();
97
+
98
+ $posts = $q->query( $this->filter_query_args( $filters, $limit, $offset ) );
99
+
100
+ if ( count( $posts ) > 0 ) {
101
+ foreach ( $posts as $post ) {
102
+
103
+ /**
104
+ * @var Product $product
105
+ */
106
+ $product = Services::get()->service( 'product_factory' )->make();
107
+ $product->set_id( $post->ID );
108
+ $product->set_status( $post->post_status );
109
+ $product->set_title( $post->post_title );
110
+ $product->set_content( $post->post_content );
111
+ $product->set_author( $post->post_author );
112
+ $product->set_excerpt( $post->post_excerpt );
113
+ $product->set_price( get_post_meta( $post->ID, '_price', true ) );
114
+ $product->set_taxable( ( 1 == get_post_meta( $post->ID, '_taxable', true ) ) );
115
+ $product->set_tax_class( get_post_meta( $post->ID, '_tax_class', true ) );
116
+ $product->set_download_ids( get_post_meta( $post->ID, '_downloads' ) );
117
+ // add download to return array
118
+ $items[] = $product;
119
+ }
120
+ }
121
+
122
+ return $items;
123
+ }
124
+
125
+ /**
126
+ * @param Product $product
127
+ *
128
+ * @throws \Exception
129
+ *
130
+ * @return bool
131
+ */
132
+ public function persist( $product ) {
133
+
134
+ // check if new download or existing
135
+ if ( 0 == $product->get_id() ) {
136
+
137
+ // create
138
+ $product_id = wp_insert_post( array(
139
+ 'post_title' => $product->get_title(),
140
+ 'post_content' => $product->get_content(),
141
+ 'post_excerpt' => $product->get_excerpt(),
142
+ 'post_author' => $product->get_author(),
143
+ 'post_type' => PostType::KEY,
144
+ 'post_status' => $product->get_status()
145
+ ) );
146
+
147
+ if ( is_wp_error( $product_id ) ) {
148
+ throw new \Exception( 'Unable to insert download in WordPress database' );
149
+ }
150
+ // set new vehicle ID
151
+ $product->set_id( $product_id );
152
+
153
+ } else {
154
+
155
+ // update
156
+ $product_id = wp_update_post( array(
157
+ 'ID' => $product->get_id(),
158
+ 'post_title' => $product->get_title(),
159
+ 'post_content' => $product->get_content(),
160
+ 'post_excerpt' => $product->get_excerpt(),
161
+ 'post_author' => $product->get_author(),
162
+ 'post_status' => $product->get_status()
163
+ ) );
164
+
165
+ if ( is_wp_error( $product_id ) ) {
166
+ throw new \Exception( 'Unable to update download in WordPress database' );
167
+ }
168
+
169
+ }
170
+
171
+ update_post_meta( $product_id, '_price', $product->get_price() );
172
+ update_post_meta( $product_id, '_taxable', 0 );
173
+ update_post_meta( $product_id, '_tax_class', $product->get_tax_class() );
174
+
175
+ // delete all linked downloads before linking set ones
176
+ delete_post_meta( $product_id, '_downloads' );
177
+ $downloads = $product->get_download_ids();
178
+ if ( ! empty( $downloads ) ) {
179
+ foreach ( $downloads as $download_id ) {
180
+ add_post_meta( $product_id, '_downloads', intval( $download_id ) );
181
+ }
182
+ }
183
+
184
+ return true;
185
+ }
186
+
187
+ }
src/Shop/Services/ServiceProvider.php CHANGED
@@ -27,6 +27,14 @@ class ServiceProvider implements Pimple\ServiceProviderInterface {
27
  return new Shop\Helper\Format();
28
  };
29
 
 
 
 
 
 
 
 
 
30
  $container['session_cookie'] = function ( $c ) {
31
  return new Shop\Session\Cookie();
32
  };
27
  return new Shop\Helper\Format();
28
  };
29
 
30
+ $container['product_factory'] = function ( $c ) {
31
+ return new Shop\Product\Factory();
32
+ };
33
+
34
+ $container['product_repository'] = function ( $c ) {
35
+ return new Shop\Product\WordPressRepository();
36
+ };
37
+
38
  $container['session_cookie'] = function ( $c ) {
39
  return new Shop\Session\Cookie();
40
  };
src/Shop/Session/Item/Factory.php CHANGED
@@ -14,16 +14,16 @@ class Factory {
14
  }
15
 
16
  /**
17
- * @param int $download_id
18
  * @param int $qty
19
  *
20
  * @return Item
21
  */
22
- public function make( $download_id, $qty ) {
23
  $item = new Item();
24
 
25
  $item->set_key( $this->generate_key() );
26
- $item->set_download_id( $download_id );
27
  $item->set_qty( $qty );
28
 
29
  return $item;
14
  }
15
 
16
  /**
17
+ * @param int $product_id
18
  * @param int $qty
19
  *
20
  * @return Item
21
  */
22
+ public function make( $product_id, $qty ) {
23
  $item = new Item();
24
 
25
  $item->set_key( $this->generate_key() );
26
+ $item->set_product_id( $product_id );
27
  $item->set_qty( $qty );
28
 
29
  return $item;
src/Shop/Session/Item/Item.php CHANGED
@@ -8,7 +8,7 @@ class Item {
8
  private $key;
9
 
10
  /** @var int */
11
- private $download_id;
12
 
13
  /** @var int */
14
  private $qty;
@@ -30,15 +30,15 @@ class Item {
30
  /**
31
  * @return int
32
  */
33
- public function get_download_id() {
34
- return $this->download_id;
35
  }
36
 
37
  /**
38
- * @param int $download_id
39
  */
40
- public function set_download_id( $download_id ) {
41
- $this->download_id = $download_id;
42
  }
43
 
44
  /**
@@ -62,9 +62,9 @@ class Item {
62
  */
63
  public function to_array() {
64
  return array(
65
- 'key' => $this->get_key(),
66
- 'download_id' => $this->get_download_id(),
67
- 'qty' => $this->get_qty()
68
  );
69
  }
70
  }
8
  private $key;
9
 
10
  /** @var int */
11
+ private $product_id;
12
 
13
  /** @var int */
14
  private $qty;
30
  /**
31
  * @return int
32
  */
33
+ public function get_product_id() {
34
+ return $this->product_id;
35
  }
36
 
37
  /**
38
+ * @param int $product_id
39
  */
40
+ public function set_product_id( $product_id ) {
41
+ $this->product_id = $product_id;
42
  }
43
 
44
  /**
62
  */
63
  public function to_array() {
64
  return array(
65
+ 'key' => $this->get_key(),
66
+ 'product_id' => $this->get_product_id(),
67
+ 'qty' => $this->get_qty()
68
  );
69
  }
70
  }
src/Shop/Session/WordPressRepository.php CHANGED
@@ -42,7 +42,7 @@ class WordPressRepository implements Repository {
42
  foreach ( $data->items as $db_item ) {
43
  $item = new Item\Item();
44
  $item->set_key( $db_item->key );
45
- $item->set_download_id( $db_item->download_id );
46
  $item->set_qty( $db_item->qty );
47
  $session_items[ $db_item->key ] = $item;
48
  }
42
  foreach ( $data->items as $db_item ) {
43
  $item = new Item\Item();
44
  $item->set_key( $db_item->key );
45
+ $item->set_product_id( $db_item->product_id );
46
  $item->set_qty( $db_item->qty );
47
  $session_items[ $db_item->key ] = $item;
48
  }
src/Shop/Shortcode/Buy.php CHANGED
@@ -40,13 +40,10 @@ class Buy {
40
 
41
  // create download object
42
  try {
43
- /** @var \Never5\DownloadMonitor\Shop\DownloadProduct\DownloadProduct $download */
44
- $download = download_monitor()->service( 'download_repository' )->retrieve_single( $id );
45
 
46
-
47
- /** @todo check if product */
48
-
49
- $atc_url = Services::get()->service( 'page' )->get_add_to_cart_url( $download->get_id() );
50
 
51
  // if we have content, wrap in a link only
52
  if ( $content ) {
@@ -58,8 +55,8 @@ class Buy {
58
 
59
  // load template
60
  download_monitor()->service( 'template_handler' )->get_template_part( 'shop/button/add-to-cart', $template, '', array(
61
- 'download' => $download,
62
- 'atc_url' => $atc_url
63
  ) );
64
 
65
  // get output
@@ -71,7 +68,7 @@ class Buy {
71
  }
72
  }
73
  } catch ( \Exception $e ) {
74
- $output = '[' . __( 'Download not found', 'download-monitor' ) . ']';
75
  }
76
 
77
  return $output;
40
 
41
  // create download object
42
  try {
43
+ /** @var \Never5\DownloadMonitor\Shop\Product\Product $download */
44
+ $product = Services::get()->service( 'product_repository' )->retrieve_single( $id );
45
 
46
+ $atc_url = Services::get()->service( 'page' )->get_add_to_cart_url( $product->get_id() );
 
 
 
47
 
48
  // if we have content, wrap in a link only
49
  if ( $content ) {
55
 
56
  // load template
57
  download_monitor()->service( 'template_handler' )->get_template_part( 'shop/button/add-to-cart', $template, '', array(
58
+ 'product' => $product,
59
+ 'atc_url' => $atc_url
60
  ) );
61
 
62
  // get output
68
  }
69
  }
70
  } catch ( \Exception $e ) {
71
+ $output = '[' . __( 'Product not found', 'download-monitor' ) . ']';
72
  }
73
 
74
  return $output;
src/Shop/Util/Assets.php CHANGED
@@ -57,7 +57,7 @@ class Assets {
57
  if (
58
  'edit.php' == $pagenow
59
  && isset( $_GET['post_type'] )
60
- && 'dlm_download' === $_GET['post_type']
61
  && isset( $_GET['page'] )
62
  && 'download-monitor-orders' == $_GET['page']
63
  && isset( $_GET['details'] )
57
  if (
58
  'edit.php' == $pagenow
59
  && isset( $_GET['post_type'] )
60
+ && PostType::KEY === $_GET['post_type']
61
  && isset( $_GET['page'] )
62
  && 'download-monitor-orders' == $_GET['page']
63
  && isset( $_GET['details'] )
src/Shop/Util/Page.php CHANGED
@@ -44,12 +44,12 @@ class Page {
44
  /**
45
  * Returns add to cart URL for given download ID
46
  *
47
- * @param int $download_id
48
  *
49
  * @return string
50
  */
51
- public function get_add_to_cart_url( $download_id ) {
52
- return add_query_arg( array( 'dlm-add-to-cart' => $download_id ), $this->get_cart_url() );
53
  }
54
 
55
  /**
44
  /**
45
  * Returns add to cart URL for given download ID
46
  *
47
+ * @param int $product_id
48
  *
49
  * @return string
50
  */
51
+ public function get_add_to_cart_url( $product_id ) {
52
+ return add_query_arg( array( 'dlm-add-to-cart' => $product_id ), $this->get_cart_url() );
53
  }
54
 
55
  /**
src/Shop/Util/PostType.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Never5\DownloadMonitor\Shop\Util;
4
+
5
+ class PostType {
6
+
7
+ const KEY = 'dlm_product';
8
+
9
+ public function setup() {
10
+
11
+ // register the post type
12
+ add_action( 'dlm_after_post_type_register', function () {
13
+
14
+ register_post_type( PostType::KEY,
15
+ apply_filters( 'dlm_cpt_dlm_product_args', array(
16
+ 'labels' => array(
17
+ 'all_items' => __( 'All Products', 'download-monitor' ),
18
+ 'name' => __( 'Shop', 'download-monitor' ),
19
+ 'singular_name' => __( 'Product', 'download-monitor' ),
20
+ 'add_new' => __( 'Add New Product', 'download-monitor' ),
21
+ 'add_new_item' => __( 'Add Product', 'download-monitor' ),
22
+ 'edit' => __( 'Edit', 'download-monitor' ),
23
+ 'edit_item' => __( 'Edit Product', 'download-monitor' ),
24
+ 'new_item' => __( 'New Product', 'download-monitor' ),
25
+ 'view' => __( 'View Product', 'download-monitor' ),
26
+ 'view_item' => __( 'View Product', 'download-monitor' ),
27
+ 'search_items' => __( 'Search Products', 'download-monitor' ),
28
+ 'not_found' => __( 'No Products found', 'download-monitor' ),
29
+ 'not_found_in_trash' => __( 'No Products found in trash', 'download-monitor' ),
30
+ 'parent' => __( 'Parent Product', 'download-monitor' )
31
+ ),
32
+ 'taxonomies' => array(),
33
+ 'description' => __( 'This is where you can create and manage download products for your site.', 'download-monitor' ),
34
+ 'public' => true,
35
+ 'show_ui' => true,
36
+ 'capability_type' => 'post',
37
+ 'capabilities' => array(
38
+ 'publish_posts' => 'manage_downloads',
39
+ 'edit_posts' => 'manage_downloads',
40
+ 'edit_others_posts' => 'manage_downloads',
41
+ 'delete_posts' => 'manage_downloads',
42
+ 'delete_others_posts' => 'manage_downloads',
43
+ 'read_private_posts' => 'manage_downloads',
44
+ 'edit_post' => 'manage_downloads',
45
+ 'delete_post' => 'manage_downloads',
46
+ 'read_post' => 'manage_downloads'
47
+ ),
48
+ 'hierarchical' => false,
49
+ 'publicly_queryable' => true,
50
+ 'exclude_from_search' => true,
51
+ 'rewrite' => array(
52
+ 'slug' => 'product',
53
+ 'with_front' => true,
54
+ 'pages' => true,
55
+ 'feeds' => true,
56
+ ),
57
+ 'supports' => apply_filters( 'dlm_cpt_dlm_product_supports', array(
58
+ 'title',
59
+ 'editor',
60
+ 'excerpt',
61
+ 'thumbnail',
62
+ 'custom-fields'
63
+ ) ),
64
+ 'has_archive' => 'products',
65
+ 'show_in_nav_menus' => false,
66
+ 'menu_icon' => 'dashicons-cart',
67
+ 'can_export' => true,
68
+ 'menu_position' => 36
69
+ ) )
70
+ );
71
+
72
+ } );
73
+
74
+ // setup a custom separator
75
+ add_action( 'admin_menu', function () {
76
+
77
+ global $menu;
78
+
79
+ $menu["34.9999"] = array(
80
+ '',
81
+ 'read',
82
+ 'separator-download-monitor',
83
+ '',
84
+ 'wp-menu-separator'
85
+ );
86
+
87
+
88
+ }, 9 );
89
+ }
90
+
91
+
92
+ }
src/Shop/Util/TemplateInjector.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Never5\DownloadMonitor\Shop\Util;
4
+
5
+ use Never5\DownloadMonitor\Shop\Services\Services;
6
+
7
+ class TemplateInjector {
8
+
9
+ /**
10
+ * Init
11
+ */
12
+ public function init() {
13
+ add_filter( 'the_content', array( $this, 'inject_singular_content' ) );
14
+ }
15
+
16
+ /**
17
+ * Inject vehicle singular content into singular page
18
+ *
19
+ * @param string $content
20
+ *
21
+ * @return string
22
+ */
23
+ public function inject_singular_content( $content ) {
24
+ global $post;
25
+
26
+ // check if we need to inject
27
+ if ( ! is_singular( PostType::KEY ) || ! in_the_loop() ) {
28
+ return $content;
29
+ }
30
+
31
+ // remove filter to prevent crazy loops
32
+ remove_filter( 'the_content', array( $this, 'inject_singular_content' ) );
33
+
34
+ // check if vehicle actually the post type that's being looped
35
+ if ( PostType::KEY === $post->post_type ) {
36
+
37
+ try {
38
+
39
+ $product = Services::get()->service( 'product_repository' )->retrieve_single( $post->ID );
40
+
41
+ ob_start();
42
+
43
+ /**
44
+ * dlm_product_before_single_content hook
45
+ */
46
+ do_action( 'dlm_product_before_single_content', $product );
47
+
48
+ // load content-single-product
49
+ download_monitor()->service( 'template_handler' )->get_template_part( 'shop/content', 'single-product', '', array(
50
+ 'product' => $product
51
+ ) );
52
+
53
+ /**
54
+ * dlm_product_after_single_content hook
55
+ */
56
+ do_action( 'dlm_product_after_single_content', $product );
57
+
58
+ // set new content
59
+ $content = ob_get_clean();
60
+
61
+ } catch ( \Exception $exception ) {
62
+
63
+ }
64
+
65
+
66
+ }
67
+
68
+ // add filter back in place
69
+ add_filter( 'the_content', array( $this, 'inject_singular_content' ) );
70
+
71
+ // return content
72
+ return apply_filters( 'dlm_content_single_product', $content, $post );
73
+ }
74
+
75
+ }
src/Shop/bootstrap.php CHANGED
@@ -27,6 +27,16 @@ if ( ! defined( 'ABSPATH' ) ) {
27
  */
28
  require_once( 'functions.php' );
29
 
 
 
 
 
 
 
 
 
 
 
30
  /**
31
  * Only add following things in the admin
32
  */
@@ -40,8 +50,23 @@ if ( is_admin() ) {
40
  $order_page = new \Never5\DownloadMonitor\Shop\Admin\Pages\Orders();
41
  $order_page->setup();
42
 
 
 
 
 
 
 
 
 
43
  }
44
 
 
 
 
 
 
 
 
45
  /**
46
  * Setup Access manager
47
  */
27
  */
28
  require_once( 'functions.php' );
29
 
30
+ if ( ! dlm_is_shop_enabled() ) {
31
+ return;
32
+ }
33
+
34
+ /**
35
+ * Setup product post type
36
+ */
37
+ $post_type = new \Never5\DownloadMonitor\Shop\Util\PostType();
38
+ $post_type->setup();
39
+
40
  /**
41
  * Only add following things in the admin
42
  */
50
  $order_page = new \Never5\DownloadMonitor\Shop\Admin\Pages\Orders();
51
  $order_page->setup();
52
 
53
+ // Product table columns
54
+ $columns = new \Never5\DownloadMonitor\Shop\Admin\ProductTableColumns();
55
+ $columns->setup();
56
+
57
+ // Download Option
58
+ $download_option = new \Never5\DownloadMonitor\Shop\Admin\DownloadOption();
59
+ $download_option->setup();
60
+
61
  }
62
 
63
+ /**
64
+ * Setup Template Inejctor
65
+ */
66
+ $template_injector = new \Never5\DownloadMonitor\Shop\Util\TemplateInjector();
67
+ $template_injector->init();
68
+
69
+
70
  /**
71
  * Setup Access manager
72
  */
src/Shop/functions.php CHANGED
@@ -17,4 +17,16 @@ function dlm_format_money( $price, $args = array() ) {
17
  */
18
  function dlm_checkout_fields( $values = array() ) {
19
  \Never5\DownloadMonitor\Shop\Services\Services::get()->service( 'checkout_field' )->output_all_fields( $values );
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
17
  */
18
  function dlm_checkout_fields( $values = array() ) {
19
  \Never5\DownloadMonitor\Shop\Services\Services::get()->service( 'checkout_field' )->output_all_fields( $values );
20
+ }
21
+
22
+ /**
23
+ * Return if the shop functionality of Download Monitor is enabled
24
+ *
25
+ * @return bool
26
+ */
27
+ function dlm_is_shop_enabled() {
28
+ // we don't use the service here because this function needs to before the service is available
29
+ $settings = new DLM_Settings_Helper();
30
+
31
+ return ( 1 == $settings->get_option( 'shop_enabled' ) );
32
  }
src/Shortcodes.php CHANGED
@@ -534,8 +534,28 @@ class DLM_Shortcodes {
534
  $template_handler = new DLM_Template_Handler();
535
 
536
  try {
 
537
  $download = download_monitor()->service( 'download_repository' )->retrieve_single( absint( $wp->query_vars['download-id'] ) );
538
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
539
  // load no access template
540
  $template_handler->get_template_part( 'no-access', '', '', array(
541
  'download' => $download,
534
  $template_handler = new DLM_Template_Handler();
535
 
536
  try {
537
+ /** @var \DLM_Download $download */
538
  $download = download_monitor()->service( 'download_repository' )->retrieve_single( absint( $wp->query_vars['download-id'] ) );
539
 
540
+ $version_id = '';
541
+
542
+ if ( ! empty( $_GET['version'] ) ) {
543
+ $version_id = $download->get_version_id_version_name( $_GET['version'] );
544
+ }
545
+
546
+ if ( ! empty( $_GET['v'] ) ) {
547
+ $version_id = absint( $_GET['v'] );
548
+ }
549
+
550
+ if ( null != $download && $version_id ) {
551
+ try {
552
+ $version = download_monitor()->service( 'version_repository' )->retrieve_single( $version_id );
553
+ $download->set_version( $version );
554
+ } catch ( Exception $e ) {
555
+
556
+ }
557
+ }
558
+
559
  // load no access template
560
  $template_handler->get_template_part( 'no-access', '', '', array(
561
  'download' => $download,
src/UpgradeManager.php CHANGED
@@ -93,6 +93,13 @@ class DLM_Upgrade_Manager {
93
  $installer->create_shop_tables();
94
  }
95
 
 
 
 
 
 
 
 
96
 
97
  }
98
 
93
  $installer->create_shop_tables();
94
  }
95
 
96
+ // upgrade to version 4.4
97
+ if ( version_compare( $current_version, '4.4.0', '<' ) ) {
98
+ $wpdb->query( "ALTER TABLE {$wpdb->prefix}dlm_order_item CHANGE `download_id` `product_id` int(20);" );
99
+
100
+ // flush rules because of new post type in 4.4
101
+ flush_rewrite_rules();
102
+ }
103
 
104
  }
105
 
templates/shop/button/add-to-cart-box.php CHANGED
@@ -7,20 +7,20 @@ if ( ! defined( 'ABSPATH' ) ) {
7
  exit;
8
  } // Exit if accessed directly
9
 
10
- /** @var \Never5\DownloadMonitor\Shop\DownloadProduct\DownloadProduct $download */
11
  /** @var string $atc_url */
12
  ?>
13
  <aside class="download-box">
14
 
15
- <?php $download->the_image(); ?>
16
 
17
- <div class="download-count"><?php echo dlm_format_money( $download->get_price() ); ?></div>
18
 
19
  <div class="download-box-content">
20
 
21
- <h1><?php $download->the_title(); ?></h1>
22
 
23
- <?php $download->the_excerpt(); ?>
24
 
25
  <a class="download-button" title="<?php _e( 'Purchase Now', 'download-monitor' ); ?>" href="<?php echo $atc_url; ?>"
26
  rel="nofollow">
7
  exit;
8
  } // Exit if accessed directly
9
 
10
+ /** @var \Never5\DownloadMonitor\Shop\Product\Product $product */
11
  /** @var string $atc_url */
12
  ?>
13
  <aside class="download-box">
14
 
15
+ <?php echo $product->get_image(); ?>
16
 
17
+ <div class="download-count"><?php echo dlm_format_money( $product->get_price() ); ?></div>
18
 
19
  <div class="download-box-content">
20
 
21
+ <h1><?php echo $product->get_title(); ?></h1>
22
 
23
+ <p><?php echo $product->get_excerpt(); ?></p>
24
 
25
  <a class="download-button" title="<?php _e( 'Purchase Now', 'download-monitor' ); ?>" href="<?php echo $atc_url; ?>"
26
  rel="nofollow">
templates/shop/button/add-to-cart.php CHANGED
@@ -7,11 +7,11 @@ if ( ! defined( 'ABSPATH' ) ) {
7
  exit;
8
  } // Exit if accessed directly
9
 
10
- /** @var \Never5\DownloadMonitor\Shop\DownloadProduct\DownloadProduct $download */
11
  /** @var string $atc_url */
12
  ?>
13
  <p><a class="aligncenter download-button" href="<?php echo $atc_url; ?>" rel="nofollow">
14
- <?php printf( __( 'Purchase &ldquo;%s&rdquo;', 'download-monitor' ), $download->get_title() ); ?>
15
- <small><?php echo dlm_format_money( $download->get_price() ); ?>
16
- - <?php _e( 'Instant Access!', 'download-monitor' ); ?></small>
17
  </a></p>
7
  exit;
8
  } // Exit if accessed directly
9
 
10
+ /** @var \Never5\DownloadMonitor\Shop\Product\Product $product */
11
  /** @var string $atc_url */
12
  ?>
13
  <p><a class="aligncenter download-button" href="<?php echo $atc_url; ?>" rel="nofollow">
14
+ <?php printf( __( 'Purchase &ldquo;%s&rdquo;', 'download-monitor' ), $product->get_title() ); ?>
15
+ <small><?php echo dlm_format_money( $product->get_price() ); ?>
16
+ - <?php echo esc_html( $product->get_excerpt() ); ?></small>
17
  </a></p>
templates/shop/cart/item.php CHANGED
@@ -6,7 +6,7 @@ if ( ! defined( 'ABSPATH' ) ) {
6
  /** @var Never5\DownloadMonitor\Shop\Cart\Item\Item $item */
7
  ?>
8
  <tr>
9
- <td><a href="<?php echo add_query_arg( array( 'dlm-remove-from-cart' => $item->get_download_id() ), $url_cart ); ?>"
10
  class="dlm-cart-remove-item"
11
  aria-label="<?php _e( 'Remove this item from your cart', 'download-monitor' ); ?>">x</a></td>
12
  <td><?php echo $item->get_label(); ?></td>
6
  /** @var Never5\DownloadMonitor\Shop\Cart\Item\Item $item */
7
  ?>
8
  <tr>
9
+ <td><a href="<?php echo add_query_arg( array( 'dlm-remove-from-cart' => $item->get_product_id() ), $url_cart ); ?>"
10
  class="dlm-cart-remove-item"
11
  aria-label="<?php _e( 'Remove this item from your cart', 'download-monitor' ); ?>">x</a></td>
12
  <td><?php echo $item->get_label(); ?></td>
templates/shop/checkout/order-complete.php CHANGED
@@ -46,43 +46,61 @@ if ( ! defined( 'ABSPATH' ) ) {
46
 
47
  ?>
48
  <div class="dlm-checkout-complete-files">
49
- <h2>Your Files</h2>
50
  <?php
51
  $order_items = $order->get_items();
52
 
53
  if ( count( $order_items ) > 0 ) : ?>
54
 
55
- <table cellpadding="0" cellspacing="0" border="0">
56
- <thead>
57
- <tr>
58
- <th><?php _e( "Download name", 'download-monitor' ); ?></th>
59
- <th><?php _e( "Download version", 'download-monitor' ); ?></th>
60
- <th>&nbsp;</th>
61
- </tr>
62
- </thead>
63
- <tbody>
64
- <?php foreach ( $order_items as $order_item ) : ?>
65
- <?php
66
- $download = null;
67
- $version_label = "-";
68
- $download_button_html = __( 'Download is no longer available', 'download-monitor' );
69
- try {
70
- /** @var \Never5\DownloadMonitor\Shop\DownloadProduct\DownloadProduct $download */
71
- $download = download_monitor()->service( 'download_repository' )->retrieve_single( $order_item->get_download_id() );
72
-
73
- $version_label = $download->get_version()->get_version();
74
- $download_button_html = "<a href='" . $download->get_secure_download_link( $order ) . "' class='dlm-checkout-download-button'>" . __( 'Download File', 'download-monitor' ) . "</a>";
75
- } catch ( \Exception $e ) {
76
- }
77
  ?>
78
- <tr>
79
- <td><?php echo $order_item->get_label(); ?></td>
80
- <td><?php echo $version_label; ?></td>
81
- <td><?php echo $download_button_html; ?></td>
82
- </tr>
83
- <?php endforeach; ?>
84
- </tbody>
85
- </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
 
87
  <?php else: ?>
88
  <p>No items found.</p>
46
 
47
  ?>
48
  <div class="dlm-checkout-complete-files">
49
+ <h2>Your Products</h2>
50
  <?php
51
  $order_items = $order->get_items();
52
 
53
  if ( count( $order_items ) > 0 ) : ?>
54
 
55
+ <?php foreach ( $order_items as $order_item ) : ?>
56
+
57
+ <?php
58
+ try {
59
+ $product = \Never5\DownloadMonitor\Shop\Services\Services::get()->service( 'product_repository' )->retrieve_single( $order_item->get_product_id() );
60
+ } catch ( \Exception $exception ) {
61
+ continue;
62
+ }
63
+
64
+ ?>
65
+
66
+ <h3><?php echo esc_html( $product->get_title() ); ?></h3>
67
+ <?php
68
+ $downloads = $product->get_downloads();
69
+ if ( ! empty( $downloads ) ) :
 
 
 
 
 
 
 
70
  ?>
71
+ <table cellpadding="0" cellspacing="0" border="0">
72
+ <thead>
73
+ <tr>
74
+ <th><?php _e( "Download name", 'download-monitor' ); ?></th>
75
+ <th><?php _e( "Download version", 'download-monitor' ); ?></th>
76
+ <th>&nbsp;</th>
77
+ </tr>
78
+ </thead>
79
+ <tbody>
80
+ <?php foreach ( $downloads as $download ) : ?>
81
+ <?php
82
+ $download_title = "-";
83
+ $version_label = "-";
84
+ $download_button_html = __( 'Download is no longer available', 'download-monitor' );
85
+
86
+ if ( $download->exists() ) {
87
+ $download_title = $download->get_title();
88
+ $version_label = $download->get_version()->get_version();
89
+ $download_button_html = "<a href='" . $product->get_secure_download_link( $order, $download ) . "' class='dlm-checkout-download-button'>" . __( 'Download File', 'download-monitor' ) . "</a>";
90
+ }
91
+
92
+ ?>
93
+ <tr>
94
+ <td><?php echo $download_title; ?></td>
95
+ <td><?php echo $version_label; ?></td>
96
+ <td><?php echo $download_button_html; ?></td>
97
+ </tr>
98
+ <?php endforeach; ?>
99
+ </tbody>
100
+ </table>
101
+ <?php endif; ?>
102
+ <?php endforeach; ?>
103
+
104
 
105
  <?php else: ?>
106
  <p>No items found.</p>
templates/shop/content-single-product.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ } // Exit if accessed directly
5
+
6
+ /** @var \Never5\DownloadMonitor\Shop\Product\Product $product */
7
+
8
+ /**
9
+ * dlm_before_single_product hook
10
+ */
11
+ do_action( 'dlm_before_single_product', $product );
12
+ ?>
13
+ <div class="dlm-product">
14
+ <?php if ( $product->get_content() != "" ) : ?>
15
+ <p><?php echo esc_html( $product->get_content() ); ?></p>
16
+ <?php echo do_shortcode( sprintf( '[dlm_buy id="%s"]', intval( $product->get_id() ) ) ); ?>
17
+ <?php endif; ?>
18
+ </div>
19
+ <?php do_action( 'dlm_after_single_product', $product ); ?>
templates/shop/email/elements/downloads-table-plain.php CHANGED
@@ -2,10 +2,16 @@
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  } // Exit if accessed directly
5
- ?>
6
 
7
- <?php if ( count( $items ) > 0 ) : ?>
8
- <?php foreach ( $items as $item ) : ?>
9
- <?php echo $item['label']; ?> ( <?php echo $item['version']; ?> ): <?php echo $item['download_url'] . PHP_EOL; ?>
 
 
 
 
 
 
 
10
  <?php endforeach; ?>
11
- <?php endif; ?>
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  } // Exit if accessed directly
 
5
 
6
+ /** @var array $products */
7
+ ?>
8
+ <?php if ( count( $products ) > 0 ) : ?>
9
+ <?php foreach ( $products as $product ) : ?>
10
+ -- <?php echo $product['label']; ?> -- <?php echo PHP_EOL; ?>
11
+ <?php if ( count( $product['downloads'] ) > 0 ) : ?>
12
+ <?php foreach ( $product['downloads'] as $item ) : ?>
13
+ <?php echo $item['label']; ?> ( <?php echo $item['version']; ?> ): <?php echo $item['download_url'] . PHP_EOL; ?>
14
+ <?php endforeach; ?>
15
+ <?php endif; ?>
16
  <?php endforeach; ?>
17
+ <?php endif; ?>
templates/shop/email/elements/downloads-table.php CHANGED
@@ -2,24 +2,32 @@
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  } // Exit if accessed directly
 
 
5
  ?>
6
- <table cellpadding="0" cellspacing="0" border="0" class="dlm-downloads-table">
7
- <thead>
8
- <tr>
9
- <th class="dlm-th-name"><?php _e( "Download name", 'download-monitor' ); ?></th>
10
- <th class="dlm-th-version"><?php _e( "Version", 'download-monitor' ); ?></th>
11
- <th class="dlm-th-download-button">&nbsp;</th>
12
- </tr>
13
- </thead>
14
- <tbody>
15
- <?php if ( count( $items ) > 0 ) : ?>
16
- <?php foreach ( $items as $item ) : ?>
17
  <tr>
18
- <td class="dlm-td-name"><?php echo $item['label']; ?></td>
19
- <td class="dlm-td-version"><?php echo $item['version']; ?></td>
20
- <td class="dlm-td-download-button"><?php echo $item['button']; ?></td>
21
  </tr>
22
- <?php endforeach; ?>
23
- <?php endif; ?>
24
- </tbody>
25
- </table>
 
 
 
 
 
 
 
 
 
 
 
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  } // Exit if accessed directly
5
+
6
+ /** @var array $products */
7
  ?>
8
+ <?php if ( count( $products ) > 0 ) : ?>
9
+ <?php foreach ( $products as $product ) : ?>
10
+ <strong style="font-size: 1.2em;"><?php echo $product['label'] ?></strong><br/>
11
+ <br/>
12
+ <table cellpadding="0" cellspacing="0" border="0" class="dlm-downloads-table">
13
+ <thead>
 
 
 
 
 
14
  <tr>
15
+ <th class="dlm-th-name"><?php _e( "Download name", 'download-monitor' ); ?></th>
16
+ <th class="dlm-th-version"><?php _e( "Version", 'download-monitor' ); ?></th>
17
+ <th class="dlm-th-download-button">&nbsp;</th>
18
  </tr>
19
+ </thead>
20
+ <tbody>
21
+ <?php if ( count( $product['downloads'] ) > 0 ) : ?>
22
+ <?php foreach ( $product['downloads'] as $item ) : ?>
23
+ <tr>
24
+ <td class="dlm-td-name"><?php echo $item['label']; ?></td>
25
+ <td class="dlm-td-version"><?php echo $item['version']; ?></td>
26
+ <td class="dlm-td-download-button"><?php echo $item['button']; ?></td>
27
+ </tr>
28
+ <?php endforeach; ?>
29
+ <?php endif; ?>
30
+ </tbody>
31
+ </table>
32
+ <?php endforeach; ?>
33
+ <?php endif; ?>
templates/shop/email/new-order.php CHANGED
@@ -69,7 +69,7 @@ if ( ! defined( 'ABSPATH' ) ) {
69
  <br/>
70
  Thank you for your purchase, this email confirms your order.<br/>
71
  <br/>
72
- Here's an overview of your files:<br/>
73
  <br/>
74
  %DOWNLOADS_TABLE%
75
  <br/>
69
  <br/>
70
  Thank you for your purchase, this email confirms your order.<br/>
71
  <br/>
72
+ Here's an overview of your purchase:<br/>
73
  <br/>
74
  %DOWNLOADS_TABLE%
75
  <br/>
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit94acd08466c780b771c5bd33d4e665e4::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit80ce4473100edd20fd6c17775a76ce9a::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -297,9 +297,11 @@ return array(
297
  'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\LoggerInterfaceTest' => $baseDir . '/src/Dependencies/Psr/Log/Test/LoggerInterfaceTest.php',
298
  'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\TestLogger' => $baseDir . '/src/Dependencies/Psr/Log/Test/TestLogger.php',
299
  'Never5\\DownloadMonitor\\Shop\\Access\\Manager' => $baseDir . '/src/Shop/Access/Manager.php',
 
300
  'Never5\\DownloadMonitor\\Shop\\Admin\\Fields\\GatewayOverview' => $baseDir . '/src/Shop/Admin/Fields/GatewayOverview.php',
301
  'Never5\\DownloadMonitor\\Shop\\Admin\\OrderTable' => $baseDir . '/src/Shop/Admin/OrderTable.php',
302
  'Never5\\DownloadMonitor\\Shop\\Admin\\Pages\\Orders' => $baseDir . '/src/Shop/Admin/Pages/Orders.php',
 
303
  'Never5\\DownloadMonitor\\Shop\\Admin\\WritePanels' => $baseDir . '/src/Shop/Admin/WritePanels.php',
304
  'Never5\\DownloadMonitor\\Shop\\Ajax\\AdminChangeOrderStatus' => $baseDir . '/src/Shop/Ajax/AdminChangeOrderStatus.php',
305
  'Never5\\DownloadMonitor\\Shop\\Ajax\\Ajax' => $baseDir . '/src/Shop/Ajax/Ajax.php',
@@ -318,7 +320,6 @@ return array(
318
  'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PaymentGateway' => $baseDir . '/src/Shop/Checkout/PaymentGateway/PaymentGateway.php',
319
  'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Result' => $baseDir . '/src/Shop/Checkout/PaymentGateway/Result.php',
320
  'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Test\\TestGateway' => $baseDir . '/src/Shop/Checkout/PaymentGateway/Test/TestGateway.php',
321
- 'Never5\\DownloadMonitor\\Shop\\DownloadProduct\\DownloadProduct' => $baseDir . '/src/Shop/DownloadProduct/DownloadProduct.php',
322
  'Never5\\DownloadMonitor\\Shop\\Email\\Handler' => $baseDir . '/src/Shop/Email/Handler.php',
323
  'Never5\\DownloadMonitor\\Shop\\Email\\Message' => $baseDir . '/src/Shop/Email/Message.php',
324
  'Never5\\DownloadMonitor\\Shop\\Email\\VarParser' => $baseDir . '/src/Shop/Email/VarParser.php',
@@ -339,6 +340,10 @@ return array(
339
  'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransaction' => $baseDir . '/src/Shop/Order/Transaction/OrderTransaction.php',
340
  'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransactionStatus' => $baseDir . '/src/Shop/Order/Transaction/OrderTransactionStatus.php',
341
  'Never5\\DownloadMonitor\\Shop\\Order\\WordPressRepository' => $baseDir . '/src/Shop/Order/WordPressRepository.php',
 
 
 
 
342
  'Never5\\DownloadMonitor\\Shop\\Services\\ServiceProvider' => $baseDir . '/src/Shop/Services/ServiceProvider.php',
343
  'Never5\\DownloadMonitor\\Shop\\Services\\Services' => $baseDir . '/src/Shop/Services/Services.php',
344
  'Never5\\DownloadMonitor\\Shop\\Session\\Cookie' => $baseDir . '/src/Shop/Session/Cookie.php',
@@ -356,7 +361,9 @@ return array(
356
  'Never5\\DownloadMonitor\\Shop\\Tax\\TaxRate' => $baseDir . '/src/Shop/Tax/TaxRate.php',
357
  'Never5\\DownloadMonitor\\Shop\\Util\\Assets' => $baseDir . '/src/Shop/Util/Assets.php',
358
  'Never5\\DownloadMonitor\\Shop\\Util\\Page' => $baseDir . '/src/Shop/Util/Page.php',
 
359
  'Never5\\DownloadMonitor\\Shop\\Util\\Redirect' => $baseDir . '/src/Shop/Util/Redirect.php',
 
360
  'Never5\\DownloadMonitor\\Util\\ExtensionLoader' => $baseDir . '/src/Util/ExtensionLoader.php',
361
  'Never5\\DownloadMonitor\\Util\\Onboarding' => $baseDir . '/src/Util/Onboarding.php',
362
  'Never5\\DownloadMonitor\\Util\\PageCreator' => $baseDir . '/src/Util/PageCreator.php',
297
  'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\LoggerInterfaceTest' => $baseDir . '/src/Dependencies/Psr/Log/Test/LoggerInterfaceTest.php',
298
  'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\TestLogger' => $baseDir . '/src/Dependencies/Psr/Log/Test/TestLogger.php',
299
  'Never5\\DownloadMonitor\\Shop\\Access\\Manager' => $baseDir . '/src/Shop/Access/Manager.php',
300
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\DownloadOption' => $baseDir . '/src/Shop/Admin/DownloadOption.php',
301
  'Never5\\DownloadMonitor\\Shop\\Admin\\Fields\\GatewayOverview' => $baseDir . '/src/Shop/Admin/Fields/GatewayOverview.php',
302
  'Never5\\DownloadMonitor\\Shop\\Admin\\OrderTable' => $baseDir . '/src/Shop/Admin/OrderTable.php',
303
  'Never5\\DownloadMonitor\\Shop\\Admin\\Pages\\Orders' => $baseDir . '/src/Shop/Admin/Pages/Orders.php',
304
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\ProductTableColumns' => $baseDir . '/src/Shop/Admin/ProductTableColumns.php',
305
  'Never5\\DownloadMonitor\\Shop\\Admin\\WritePanels' => $baseDir . '/src/Shop/Admin/WritePanels.php',
306
  'Never5\\DownloadMonitor\\Shop\\Ajax\\AdminChangeOrderStatus' => $baseDir . '/src/Shop/Ajax/AdminChangeOrderStatus.php',
307
  'Never5\\DownloadMonitor\\Shop\\Ajax\\Ajax' => $baseDir . '/src/Shop/Ajax/Ajax.php',
320
  'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PaymentGateway' => $baseDir . '/src/Shop/Checkout/PaymentGateway/PaymentGateway.php',
321
  'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Result' => $baseDir . '/src/Shop/Checkout/PaymentGateway/Result.php',
322
  'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Test\\TestGateway' => $baseDir . '/src/Shop/Checkout/PaymentGateway/Test/TestGateway.php',
 
323
  'Never5\\DownloadMonitor\\Shop\\Email\\Handler' => $baseDir . '/src/Shop/Email/Handler.php',
324
  'Never5\\DownloadMonitor\\Shop\\Email\\Message' => $baseDir . '/src/Shop/Email/Message.php',
325
  'Never5\\DownloadMonitor\\Shop\\Email\\VarParser' => $baseDir . '/src/Shop/Email/VarParser.php',
340
  'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransaction' => $baseDir . '/src/Shop/Order/Transaction/OrderTransaction.php',
341
  'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransactionStatus' => $baseDir . '/src/Shop/Order/Transaction/OrderTransactionStatus.php',
342
  'Never5\\DownloadMonitor\\Shop\\Order\\WordPressRepository' => $baseDir . '/src/Shop/Order/WordPressRepository.php',
343
+ 'Never5\\DownloadMonitor\\Shop\\Product\\Factory' => $baseDir . '/src/Shop/Product/Factory.php',
344
+ 'Never5\\DownloadMonitor\\Shop\\Product\\Product' => $baseDir . '/src/Shop/Product/Product.php',
345
+ 'Never5\\DownloadMonitor\\Shop\\Product\\Repository' => $baseDir . '/src/Shop/Product/Repository.php',
346
+ 'Never5\\DownloadMonitor\\Shop\\Product\\WordPressRepository' => $baseDir . '/src/Shop/Product/WordPressRepository.php',
347
  'Never5\\DownloadMonitor\\Shop\\Services\\ServiceProvider' => $baseDir . '/src/Shop/Services/ServiceProvider.php',
348
  'Never5\\DownloadMonitor\\Shop\\Services\\Services' => $baseDir . '/src/Shop/Services/Services.php',
349
  'Never5\\DownloadMonitor\\Shop\\Session\\Cookie' => $baseDir . '/src/Shop/Session/Cookie.php',
361
  'Never5\\DownloadMonitor\\Shop\\Tax\\TaxRate' => $baseDir . '/src/Shop/Tax/TaxRate.php',
362
  'Never5\\DownloadMonitor\\Shop\\Util\\Assets' => $baseDir . '/src/Shop/Util/Assets.php',
363
  'Never5\\DownloadMonitor\\Shop\\Util\\Page' => $baseDir . '/src/Shop/Util/Page.php',
364
+ 'Never5\\DownloadMonitor\\Shop\\Util\\PostType' => $baseDir . '/src/Shop/Util/PostType.php',
365
  'Never5\\DownloadMonitor\\Shop\\Util\\Redirect' => $baseDir . '/src/Shop/Util/Redirect.php',
366
+ 'Never5\\DownloadMonitor\\Shop\\Util\\TemplateInjector' => $baseDir . '/src/Shop/Util/TemplateInjector.php',
367
  'Never5\\DownloadMonitor\\Util\\ExtensionLoader' => $baseDir . '/src/Util/ExtensionLoader.php',
368
  'Never5\\DownloadMonitor\\Util\\Onboarding' => $baseDir . '/src/Util/Onboarding.php',
369
  'Never5\\DownloadMonitor\\Util\\PageCreator' => $baseDir . '/src/Util/PageCreator.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit94acd08466c780b771c5bd33d4e665e4
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit94acd08466c780b771c5bd33d4e665e4
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit94acd08466c780b771c5bd33d4e665e4', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit94acd08466c780b771c5bd33d4e665e4', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit94acd08466c780b771c5bd33d4e665e4::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit80ce4473100edd20fd6c17775a76ce9a
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit80ce4473100edd20fd6c17775a76ce9a', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit80ce4473100edd20fd6c17775a76ce9a', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit94acd08466c780b771c5bd33d4e665e4
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'N' =>
@@ -312,9 +312,11 @@ class ComposerStaticInit94acd08466c780b771c5bd33d4e665e4
312
  'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/Test/LoggerInterfaceTest.php',
313
  'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\TestLogger' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/Test/TestLogger.php',
314
  'Never5\\DownloadMonitor\\Shop\\Access\\Manager' => __DIR__ . '/../..' . '/src/Shop/Access/Manager.php',
 
315
  'Never5\\DownloadMonitor\\Shop\\Admin\\Fields\\GatewayOverview' => __DIR__ . '/../..' . '/src/Shop/Admin/Fields/GatewayOverview.php',
316
  'Never5\\DownloadMonitor\\Shop\\Admin\\OrderTable' => __DIR__ . '/../..' . '/src/Shop/Admin/OrderTable.php',
317
  'Never5\\DownloadMonitor\\Shop\\Admin\\Pages\\Orders' => __DIR__ . '/../..' . '/src/Shop/Admin/Pages/Orders.php',
 
318
  'Never5\\DownloadMonitor\\Shop\\Admin\\WritePanels' => __DIR__ . '/../..' . '/src/Shop/Admin/WritePanels.php',
319
  'Never5\\DownloadMonitor\\Shop\\Ajax\\AdminChangeOrderStatus' => __DIR__ . '/../..' . '/src/Shop/Ajax/AdminChangeOrderStatus.php',
320
  'Never5\\DownloadMonitor\\Shop\\Ajax\\Ajax' => __DIR__ . '/../..' . '/src/Shop/Ajax/Ajax.php',
@@ -333,7 +335,6 @@ class ComposerStaticInit94acd08466c780b771c5bd33d4e665e4
333
  'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PaymentGateway' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/PaymentGateway.php',
334
  'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Result' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/Result.php',
335
  'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Test\\TestGateway' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/Test/TestGateway.php',
336
- 'Never5\\DownloadMonitor\\Shop\\DownloadProduct\\DownloadProduct' => __DIR__ . '/../..' . '/src/Shop/DownloadProduct/DownloadProduct.php',
337
  'Never5\\DownloadMonitor\\Shop\\Email\\Handler' => __DIR__ . '/../..' . '/src/Shop/Email/Handler.php',
338
  'Never5\\DownloadMonitor\\Shop\\Email\\Message' => __DIR__ . '/../..' . '/src/Shop/Email/Message.php',
339
  'Never5\\DownloadMonitor\\Shop\\Email\\VarParser' => __DIR__ . '/../..' . '/src/Shop/Email/VarParser.php',
@@ -354,6 +355,10 @@ class ComposerStaticInit94acd08466c780b771c5bd33d4e665e4
354
  'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransaction' => __DIR__ . '/../..' . '/src/Shop/Order/Transaction/OrderTransaction.php',
355
  'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransactionStatus' => __DIR__ . '/../..' . '/src/Shop/Order/Transaction/OrderTransactionStatus.php',
356
  'Never5\\DownloadMonitor\\Shop\\Order\\WordPressRepository' => __DIR__ . '/../..' . '/src/Shop/Order/WordPressRepository.php',
 
 
 
 
357
  'Never5\\DownloadMonitor\\Shop\\Services\\ServiceProvider' => __DIR__ . '/../..' . '/src/Shop/Services/ServiceProvider.php',
358
  'Never5\\DownloadMonitor\\Shop\\Services\\Services' => __DIR__ . '/../..' . '/src/Shop/Services/Services.php',
359
  'Never5\\DownloadMonitor\\Shop\\Session\\Cookie' => __DIR__ . '/../..' . '/src/Shop/Session/Cookie.php',
@@ -371,7 +376,9 @@ class ComposerStaticInit94acd08466c780b771c5bd33d4e665e4
371
  'Never5\\DownloadMonitor\\Shop\\Tax\\TaxRate' => __DIR__ . '/../..' . '/src/Shop/Tax/TaxRate.php',
372
  'Never5\\DownloadMonitor\\Shop\\Util\\Assets' => __DIR__ . '/../..' . '/src/Shop/Util/Assets.php',
373
  'Never5\\DownloadMonitor\\Shop\\Util\\Page' => __DIR__ . '/../..' . '/src/Shop/Util/Page.php',
 
374
  'Never5\\DownloadMonitor\\Shop\\Util\\Redirect' => __DIR__ . '/../..' . '/src/Shop/Util/Redirect.php',
 
375
  'Never5\\DownloadMonitor\\Util\\ExtensionLoader' => __DIR__ . '/../..' . '/src/Util/ExtensionLoader.php',
376
  'Never5\\DownloadMonitor\\Util\\Onboarding' => __DIR__ . '/../..' . '/src/Util/Onboarding.php',
377
  'Never5\\DownloadMonitor\\Util\\PageCreator' => __DIR__ . '/../..' . '/src/Util/PageCreator.php',
@@ -385,9 +392,9 @@ class ComposerStaticInit94acd08466c780b771c5bd33d4e665e4
385
  public static function getInitializer(ClassLoader $loader)
386
  {
387
  return \Closure::bind(function () use ($loader) {
388
- $loader->prefixLengthsPsr4 = ComposerStaticInit94acd08466c780b771c5bd33d4e665e4::$prefixLengthsPsr4;
389
- $loader->prefixDirsPsr4 = ComposerStaticInit94acd08466c780b771c5bd33d4e665e4::$prefixDirsPsr4;
390
- $loader->classMap = ComposerStaticInit94acd08466c780b771c5bd33d4e665e4::$classMap;
391
 
392
  }, null, ClassLoader::class);
393
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'N' =>
312
  'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/Test/LoggerInterfaceTest.php',
313
  'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\TestLogger' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/Test/TestLogger.php',
314
  'Never5\\DownloadMonitor\\Shop\\Access\\Manager' => __DIR__ . '/../..' . '/src/Shop/Access/Manager.php',
315
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\DownloadOption' => __DIR__ . '/../..' . '/src/Shop/Admin/DownloadOption.php',
316
  'Never5\\DownloadMonitor\\Shop\\Admin\\Fields\\GatewayOverview' => __DIR__ . '/../..' . '/src/Shop/Admin/Fields/GatewayOverview.php',
317
  'Never5\\DownloadMonitor\\Shop\\Admin\\OrderTable' => __DIR__ . '/../..' . '/src/Shop/Admin/OrderTable.php',
318
  'Never5\\DownloadMonitor\\Shop\\Admin\\Pages\\Orders' => __DIR__ . '/../..' . '/src/Shop/Admin/Pages/Orders.php',
319
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\ProductTableColumns' => __DIR__ . '/../..' . '/src/Shop/Admin/ProductTableColumns.php',
320
  'Never5\\DownloadMonitor\\Shop\\Admin\\WritePanels' => __DIR__ . '/../..' . '/src/Shop/Admin/WritePanels.php',
321
  'Never5\\DownloadMonitor\\Shop\\Ajax\\AdminChangeOrderStatus' => __DIR__ . '/../..' . '/src/Shop/Ajax/AdminChangeOrderStatus.php',
322
  'Never5\\DownloadMonitor\\Shop\\Ajax\\Ajax' => __DIR__ . '/../..' . '/src/Shop/Ajax/Ajax.php',
335
  'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PaymentGateway' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/PaymentGateway.php',
336
  'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Result' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/Result.php',
337
  'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Test\\TestGateway' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/Test/TestGateway.php',
 
338
  'Never5\\DownloadMonitor\\Shop\\Email\\Handler' => __DIR__ . '/../..' . '/src/Shop/Email/Handler.php',
339
  'Never5\\DownloadMonitor\\Shop\\Email\\Message' => __DIR__ . '/../..' . '/src/Shop/Email/Message.php',
340
  'Never5\\DownloadMonitor\\Shop\\Email\\VarParser' => __DIR__ . '/../..' . '/src/Shop/Email/VarParser.php',
355
  'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransaction' => __DIR__ . '/../..' . '/src/Shop/Order/Transaction/OrderTransaction.php',
356
  'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransactionStatus' => __DIR__ . '/../..' . '/src/Shop/Order/Transaction/OrderTransactionStatus.php',
357
  'Never5\\DownloadMonitor\\Shop\\Order\\WordPressRepository' => __DIR__ . '/../..' . '/src/Shop/Order/WordPressRepository.php',
358
+ 'Never5\\DownloadMonitor\\Shop\\Product\\Factory' => __DIR__ . '/../..' . '/src/Shop/Product/Factory.php',
359
+ 'Never5\\DownloadMonitor\\Shop\\Product\\Product' => __DIR__ . '/../..' . '/src/Shop/Product/Product.php',
360
+ 'Never5\\DownloadMonitor\\Shop\\Product\\Repository' => __DIR__ . '/../..' . '/src/Shop/Product/Repository.php',
361
+ 'Never5\\DownloadMonitor\\Shop\\Product\\WordPressRepository' => __DIR__ . '/../..' . '/src/Shop/Product/WordPressRepository.php',
362
  'Never5\\DownloadMonitor\\Shop\\Services\\ServiceProvider' => __DIR__ . '/../..' . '/src/Shop/Services/ServiceProvider.php',
363
  'Never5\\DownloadMonitor\\Shop\\Services\\Services' => __DIR__ . '/../..' . '/src/Shop/Services/Services.php',
364
  'Never5\\DownloadMonitor\\Shop\\Session\\Cookie' => __DIR__ . '/../..' . '/src/Shop/Session/Cookie.php',
376
  'Never5\\DownloadMonitor\\Shop\\Tax\\TaxRate' => __DIR__ . '/../..' . '/src/Shop/Tax/TaxRate.php',
377
  'Never5\\DownloadMonitor\\Shop\\Util\\Assets' => __DIR__ . '/../..' . '/src/Shop/Util/Assets.php',
378
  'Never5\\DownloadMonitor\\Shop\\Util\\Page' => __DIR__ . '/../..' . '/src/Shop/Util/Page.php',
379
+ 'Never5\\DownloadMonitor\\Shop\\Util\\PostType' => __DIR__ . '/../..' . '/src/Shop/Util/PostType.php',
380
  'Never5\\DownloadMonitor\\Shop\\Util\\Redirect' => __DIR__ . '/../..' . '/src/Shop/Util/Redirect.php',
381
+ 'Never5\\DownloadMonitor\\Shop\\Util\\TemplateInjector' => __DIR__ . '/../..' . '/src/Shop/Util/TemplateInjector.php',
382
  'Never5\\DownloadMonitor\\Util\\ExtensionLoader' => __DIR__ . '/../..' . '/src/Util/ExtensionLoader.php',
383
  'Never5\\DownloadMonitor\\Util\\Onboarding' => __DIR__ . '/../..' . '/src/Util/Onboarding.php',
384
  'Never5\\DownloadMonitor\\Util\\PageCreator' => __DIR__ . '/../..' . '/src/Util/PageCreator.php',
392
  public static function getInitializer(ClassLoader $loader)
393
  {
394
  return \Closure::bind(function () use ($loader) {
395
+ $loader->prefixLengthsPsr4 = ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a::$prefixLengthsPsr4;
396
+ $loader->prefixDirsPsr4 = ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a::$prefixDirsPsr4;
397
+ $loader->classMap = ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a::$classMap;
398
 
399
  }, null, ClassLoader::class);
400
  }